// $ANTLR 3.1 plp4.g 2012-07-02 04:40:13

	import java.lang.String;
	import java.util.HashMap;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class plp4Parser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "CLASS", "ID", "LLAVEI", "LLAVED", "PUBLIC", "STATIC", "VOID", "MAIN", "PARI", "PARD", "INT", "DOUBLE", "BOOL", "CONST", "COMA", "PYC", "ASIG", "ENTERO", "REAL", "BOOLEANO", "CORI", "CORD", "IF", "ELSE", "WHILE", "FOR", "TO", "STEP", "ADDOP", "BREAK", "CONTINUE", "NEW", "WRITELINE", "TRY", "THROW", "EXCEPTION", "EXPLAIN", "RETURN", "CATCH", "PUNTO", "READLINE", "OR", "AND", "RELOP", "MULOP", "NOT", "PRIVATE", "PROPERTY", "GET", "SET", "SINGLE", "NEWLINE", "COMENTARIO", "COMENLINEA"
    };
    public static final int MAIN=11;
    public static final int CLASS=4;
    public static final int WHILE=28;
    public static final int CONST=17;
    public static final int NEW=35;
    public static final int FOR=29;
    public static final int STEP=31;
    public static final int MULOP=48;
    public static final int NOT=49;
    public static final int PARI=12;
    public static final int ADDOP=32;
    public static final int AND=46;
    public static final int ID=5;
    public static final int EOF=-1;
    public static final int BREAK=33;
    public static final int PARD=13;
    public static final int IF=26;
    public static final int EXPLAIN=40;
    public static final int LLAVEI=6;
    public static final int ENTERO=21;
    public static final int CONTINUE=34;
    public static final int COMENTARIO=56;
    public static final int LLAVED=7;
    public static final int RETURN=41;
    public static final int DOUBLE=15;
    public static final int GET=52;
    public static final int VOID=10;
    public static final int EXCEPTION=39;
    public static final int READLINE=44;
    public static final int TO=30;
    public static final int PRIVATE=50;
    public static final int STATIC=9;
    public static final int ELSE=27;
    public static final int BOOL=16;
    public static final int CORD=25;
    public static final int SET=53;
    public static final int PYC=19;
    public static final int INT=14;
    public static final int COMENLINEA=57;
    public static final int COMA=18;
    public static final int TRY=37;
    public static final int PUNTO=43;
    public static final int REAL=22;
    public static final int NEWLINE=55;
    public static final int SINGLE=54;
    public static final int PROPERTY=51;
    public static final int OR=45;
    public static final int BOOLEANO=23;
    public static final int CORI=24;
    public static final int ASIG=20;
    public static final int WRITELINE=36;
    public static final int CATCH=42;
    public static final int PUBLIC=8;
    public static final int THROW=38;
    public static final int RELOP=47;

    // delegates
    // delegators


        public plp4Parser(TokenStream input) {
            this(input, new RecognizerSharedState());
        }
        public plp4Parser(TokenStream input, RecognizerSharedState state) {
            super(input, state);
             
        }
        

    public String[] getTokenNames() { return plp4Parser.tokenNames; }
    public String getGrammarFileName() { return "plp4.g"; }


    	TablaSimbolos tablaSimbolos = new TablaSimbolos();
    	Stack<Integer> pilaEtiquetas = new Stack<Integer>();
    	Stack<String> pilaBucles = new Stack<String>();
    	Stack<Integer> pilaCatch = new Stack<Integer>();
    	Traductor traductor = new Traductor();
    	TablaTipos tablaTipos = new TablaTipos();
    	SimboloFuncion funcionActual = null;
    	final String initHeader = "/* plp.il */ \n\n.assembly extern mscorlib {}\n.assembly 'plp' {} \n\n\n";
    	int nivel = 0;
    	int numEtiq = 0;
    	SimboloProperty propertyActual = null;
    	boolean isCampo = false;
    	boolean hayMain = false;
    	boolean isMain = false;

    	public void LanzarError(String error)
    	{
    		System.err.println(error);
    		System.exit (1);
    	}



    // $ANTLR start "s"
    // plp4.g:53:1: s : ( clase )+ ;
    public final void s() throws RecognitionException {
        String clase1 = null;


        StringBuilder salida = new StringBuilder();
        try {
            // plp4.g:54:53: ( ( clase )+ )
            // plp4.g:55:2: ( clase )+
            {
            // plp4.g:55:2: ( clase )+
            int cnt1=0;
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==CLASS) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // plp4.g:56:3: clase
            	    {
            	    pushFollow(FOLLOW_clase_in_s52);
            	    clase1=clase();

            	    state._fsp--;


            	    			salida.append(clase1);
            	    		

            	    }
            	    break;

            	default :
            	    if ( cnt1 >= 1 ) break loop1;
                        EarlyExitException eee =
                            new EarlyExitException(1, input);
                        throw eee;
                }
                cnt1++;
            } while (true);


            		if ( !hayMain )
            		{
            			LanzarError("Error 22: debe existir un unico metodo Main");
            		}
            		System.out.println( initHeader + salida.toString());
            	

            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return ;
    }
    // $ANTLR end "s"


    // $ANTLR start "clase"
    // plp4.g:70:1: clase returns [ String trad ] : CLASS ID LLAVEI ( miembro )+ LLAVED ;
    public final String clase() throws RecognitionException {
        String trad = null;

        Token ID2=null;
        String miembro3 = null;


        StringBuilder sb = new StringBuilder(); trad = ""; StringBuilder miembros = new StringBuilder();
        try {
            // plp4.g:72:106: ( CLASS ID LLAVEI ( miembro )+ LLAVED )
            // plp4.g:73:2: CLASS ID LLAVEI ( miembro )+ LLAVED
            {
            match(input,CLASS,FOLLOW_CLASS_in_clase84); 
            ID2=(Token)match(input,ID,FOLLOW_ID_in_clase86); 

            		SimboloClase s = new SimboloClase((ID2!=null?ID2.getText():null), new TipoClase(null, (ID2!=null?ID2.getText():null)));
            		if ( !tablaSimbolos.addSimbolo(s) )
            		{
            			StringBuilder err = new StringBuilder();
            			err.append("Error 1 (").append(ID2.getLine()).append(",").append(ID2.getCharPositionInLine()+1);
            			err.append("): '").append((ID2!=null?ID2.getText():null)).append("' ya existe en este ambito");
            			LanzarError(err.toString());
            		}
            	
            match(input,LLAVEI,FOLLOW_LLAVEI_in_clase92); 

            		tablaSimbolos = tablaSimbolos.push();
            		nivel++;
            	
            // plp4.g:89:2: ( miembro )+
            int cnt2=0;
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==PUBLIC||(LA2_0>=PRIVATE && LA2_0<=PROPERTY)) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // plp4.g:89:3: miembro
            	    {
            	    pushFollow(FOLLOW_miembro_in_clase99);
            	    miembro3=miembro();

            	    state._fsp--;


            	    		miembros.append(miembro3);
            	    	

            	    }
            	    break;

            	default :
            	    if ( cnt2 >= 1 ) break loop2;
                        EarlyExitException eee =
                            new EarlyExitException(2, input);
                        throw eee;
                }
                cnt2++;
            } while (true);

            match(input,LLAVED,FOLLOW_LLAVED_in_clase107); 

            //		sb.append(tablaSimbolos.toString());
            		sb.append(".class '").append((ID2!=null?ID2.getText():null)).append("' extends [mscorlib]System.Object\n{\n");
            		if ( !tablaSimbolos.hasConstructor() )
            		{
            			sb.append(".method public specialname rtspecialname instance void .ctor (");
            			sb.append(") cil managed");
            			sb.append("\n{\n\t.maxstack 1\n\tldarg 0\n");
            			sb.append("\tcall instance void [mscorlib]System.Object::.ctor()\n\tret\n}\n");
            		}
            		sb.append(miembros.toString());
            		sb.append("\n}\n");
            		tablaSimbolos = tablaSimbolos.pop();
            		trad = sb.toString();
            	

            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "clase"


    // $ANTLR start "metodo"
    // plp4.g:110:1: metodo returns [ String trad ] : ( PUBLIC STATIC VOID MAIN PARI PARD bloque[true,false] | visibilidad ( tipoSimple )? ID PARI args PARD b2= bloque[true,true] );
    public final String metodo() throws RecognitionException {
        String trad = null;

        Token ID6=null;
        plp4Parser.bloque_return b2 = null;

        plp4Parser.bloque_return bloque4 = null;

        plp4Parser.tipoSimple_return tipoSimple5 = null;

        plp4Parser.args_return args7 = null;

        plp4Parser.visibilidad_return visibilidad8 = null;


        StringBuilder salida = new StringBuilder(); trad = "";
        try {
            // plp4.g:112:65: ( PUBLIC STATIC VOID MAIN PARI PARD bloque[true,false] | visibilidad ( tipoSimple )? ID PARI args PARD b2= bloque[true,true] )
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==PUBLIC) ) {
                int LA4_1 = input.LA(2);

                if ( (LA4_1==STATIC) ) {
                    alt4=1;
                }
                else if ( (LA4_1==ID||(LA4_1>=INT && LA4_1<=BOOL)) ) {
                    alt4=2;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 4, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA4_0==PRIVATE) ) {
                alt4=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;
            }
            switch (alt4) {
                case 1 :
                    // plp4.g:113:3: PUBLIC STATIC VOID MAIN PARI PARD bloque[true,false]
                    {
                    match(input,PUBLIC,FOLLOW_PUBLIC_in_metodo131); 
                    match(input,STATIC,FOLLOW_STATIC_in_metodo133); 
                    match(input,VOID,FOLLOW_VOID_in_metodo135); 
                    match(input,MAIN,FOLLOW_MAIN_in_metodo137); 
                    match(input,PARI,FOLLOW_PARI_in_metodo139); 
                    match(input,PARD,FOLLOW_PARD_in_metodo141); 

                    			SimboloFuncion s = new SimboloFuncion("main", null);
                    			tablaSimbolos.addSimbolo(s);
                    			if ( hayMain )
                    			{
                    				LanzarError("Error 22: debe existir un unico metodo Main");
                    			}
                    			hayMain = true;
                    			isMain = true;
                    		
                    pushFollow(FOLLOW_bloque_in_metodo149);
                    bloque4=bloque(true, false);

                    state._fsp--;


                    			isMain = false;
                    			salida.append(s.toString(tablaSimbolos.getLocalsValue()));
                    			salida.append((bloque4!=null?bloque4.trad:null)).append("\tret\n}\n");
                    			trad = salida.toString();
                    			tablaSimbolos = tablaSimbolos.pop();
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:133:3: visibilidad ( tipoSimple )? ID PARI args PARD b2= bloque[true,true]
                    {
                    pushFollow(FOLLOW_visibilidad_in_metodo161);
                    visibilidad8=visibilidad();

                    state._fsp--;

                    // plp4.g:133:15: ( tipoSimple )?
                    int alt3=2;
                    int LA3_0 = input.LA(1);

                    if ( ((LA3_0>=INT && LA3_0<=BOOL)) ) {
                        alt3=1;
                    }
                    switch (alt3) {
                        case 1 :
                            // plp4.g:133:16: tipoSimple
                            {
                            pushFollow(FOLLOW_tipoSimple_in_metodo164);
                            tipoSimple5=tipoSimple();

                            state._fsp--;


                            }
                            break;

                    }

                    ID6=(Token)match(input,ID,FOLLOW_ID_in_metodo168); 
                    match(input,PARI,FOLLOW_PARI_in_metodo170); 
                    pushFollow(FOLLOW_args_in_metodo172);
                    args7=args();

                    state._fsp--;

                    match(input,PARD,FOLLOW_PARD_in_metodo174); 

                    			if ( (tipoSimple5!=null?tipoSimple5.tipo:null) == null && !(ID6!=null?ID6.getText():null).equals(tablaSimbolos.getCurrentClass().getNombre()) )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 36 (").append(ID6.getLine()).append(",").append(ID6.getCharPositionInLine()+1).append("): un metodo debe devolver algo");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( (tipoSimple5!=null?tipoSimple5.tipo:null) != null && (ID6!=null?ID6.getText():null).equals(tablaSimbolos.getCurrentClass().getNombre()) )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 35 (").append(ID6.getLine()).append(",").append(ID6.getCharPositionInLine()+1).append("): un constructor no puede devolver nada");
                    				LanzarError( sb.toString() );
                    			}
                    			funcionActual = new SimboloFuncion((ID6!=null?ID6.getText():null), (tipoSimple5!=null?tipoSimple5.tipo:null), (args7!=null?args7.argumentos:null));
                    			SimboloFuncion s = new SimboloFuncion((ID6!=null?ID6.getText():null), (tipoSimple5!=null?tipoSimple5.tipo:null), (args7!=null?args7.argumentos:null));
                    			if ( (tipoSimple5!=null?tipoSimple5.tipo:null) == null)
                    			{
                    				if ( (args7!=null?args7.argumentos:null).size() == 0)
                    					tablaSimbolos.setConstructor();
                    				s.setConstructor();
                    			}
                    			s.setClasePadre(tablaSimbolos.getCurrentClass().getNombre());
                    			s.setVisibilidad((visibilidad8!=null?visibilidad8.visibilidad:false));
                    			if ( !tablaSimbolos.addSimbolo(s) )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 24 (").append(ID6.getLine()).append(",").append(ID6.getCharPositionInLine()+1).append("): el metodo '");
                    				sb.append(tablaSimbolos.getCurrentClass().getNombre()).append(".").append((ID6!=null?ID6.getText():null)).append("(");
                    				sb.append((args7!=null?args7.tError:null)).append(")' ya esta definido");
                    				LanzarError( sb.toString() );
                    			}
                    		
                    pushFollow(FOLLOW_bloque_in_metodo184);
                    b2=bloque(true, true);

                    state._fsp--;


                    			if ( (tipoSimple5!=null?tipoSimple5.tipo:null) == null)
                    			{
                    				salida.append(".method ").append((visibilidad8!=null?visibilidad8.trad:null)).append(" specialname rtspecialname instance void .ctor (");
                    				salida.append((args7!=null?args7.trad:null));
                    				salida.append(") cil managed");
                    				salida.append("\n{\n\t.maxstack 1000\n");
                    				salida.append("\t.locals(").append((b2!=null?b2.locals:null)).append(")\n\tldarg 0\n");
                    				salida.append("\tcall instance void [mscorlib]System.Object::.ctor()");
                    				salida.append((b2!=null?b2.trad:null));
                    				salida.append("\n\tret\n}\n");
                    			}
                    			else
                    			{
                    				salida.append(".method ").append((visibilidad8!=null?visibilidad8.trad:null)).append(" ");
                    				salida.append((tipoSimple5!=null?tipoSimple5.tipo:null).toWrite()).append(" ");
                    				salida.append("'").append((ID6!=null?ID6.getText():null)).append("' (");
                    				salida.append((args7!=null?args7.trad:null));
                    				salida.append(") cil managed");
                    				salida.append("\n{\n\t.maxstack 1000\n");
                    				salida.append("\t.locals(").append((b2!=null?b2.locals:null)).append(")\n");
                    				salida.append((b2!=null?b2.trad:null));
                    				salida.append("\n\tldc.r8 0\n\tret\n");
                    				salida.append("\n}\n");
                    			}
                    			trad = salida.toString();
                    			funcionActual = null;
                    		

                    }
                    break;

            }
        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "metodo"

    public static class tipoSimple_return extends ParserRuleReturnScope {
        public Tipo tipo;
        public Integer linea;
        public Integer col;
    };

    // $ANTLR start "tipoSimple"
    // plp4.g:196:1: tipoSimple returns [ Tipo tipo, Integer linea, Integer col ] : ( INT | DOUBLE | BOOL );
    public final plp4Parser.tipoSimple_return tipoSimple() throws RecognitionException {
        plp4Parser.tipoSimple_return retval = new plp4Parser.tipoSimple_return();
        retval.start = input.LT(1);

        Token INT9=null;
        Token DOUBLE10=null;
        Token BOOL11=null;

         retval.linea = -1; retval.col = -1;
        try {
            // plp4.g:197:33: ( INT | DOUBLE | BOOL )
            int alt5=3;
            switch ( input.LA(1) ) {
            case INT:
                {
                alt5=1;
                }
                break;
            case DOUBLE:
                {
                alt5=2;
                }
                break;
            case BOOL:
                {
                alt5=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 5, 0, input);

                throw nvae;
            }

            switch (alt5) {
                case 1 :
                    // plp4.g:198:3: INT
                    {
                    INT9=(Token)match(input,INT,FOLLOW_INT_in_tipoSimple208); 

                    			retval.tipo = new TipoEntero();
                    			retval.linea = INT9.getLine();
                    			retval.col = INT9.getCharPositionInLine()+1;
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:205:3: DOUBLE
                    {
                    DOUBLE10=(Token)match(input,DOUBLE,FOLLOW_DOUBLE_in_tipoSimple221); 

                    			retval.tipo = new TipoReal();
                    			retval.linea = DOUBLE10.getLine();
                    			retval.col = DOUBLE10.getCharPositionInLine()+1;
                    		

                    }
                    break;
                case 3 :
                    // plp4.g:212:3: BOOL
                    {
                    BOOL11=(Token)match(input,BOOL,FOLLOW_BOOL_in_tipoSimple232); 

                    			retval.tipo = new TipoBooleano();
                    			retval.linea = BOOL11.getLine();
                    			retval.col = BOOL11.getCharPositionInLine()+1;
                    		

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "tipoSimple"

    public static class tipo_return extends ParserRuleReturnScope {
        public Tipo tipo;
        public Integer linea;
        public Integer col;
    };

    // $ANTLR start "tipo"
    // plp4.g:220:1: tipo returns [Tipo tipo, Integer linea, Integer col] : ( ID | tipoSimple );
    public final plp4Parser.tipo_return tipo() throws RecognitionException {
        plp4Parser.tipo_return retval = new plp4Parser.tipo_return();
        retval.start = input.LT(1);

        Token ID12=null;
        plp4Parser.tipoSimple_return tipoSimple13 = null;


        try {
            // plp4.g:220:52: ( ID | tipoSimple )
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==ID) ) {
                alt6=1;
            }
            else if ( ((LA6_0>=INT && LA6_0<=BOOL)) ) {
                alt6=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 6, 0, input);

                throw nvae;
            }
            switch (alt6) {
                case 1 :
                    // plp4.g:221:3: ID
                    {
                    ID12=(Token)match(input,ID,FOLLOW_ID_in_tipo250); 

                    			SimboloClase s = tablaSimbolos.getClass((ID12!=null?ID12.getText():null));
                    			if ( s == null )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 2 (").append(ID12.getLine()).append(",").append(ID12.getCharPositionInLine()+1).append("): simbolo '");
                    				sb.append((ID12!=null?ID12.getText():null)).append("' no ha sido declarado");
                    				LanzarError( sb.toString() );
                    			}
                    			retval.tipo = s.getTipo();
                    			retval.linea = ID12.getLine();
                    			retval.col = ID12.getCharPositionInLine()+1;
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:236:3: tipoSimple
                    {
                    pushFollow(FOLLOW_tipoSimple_in_tipo261);
                    tipoSimple13=tipoSimple();

                    state._fsp--;


                    			retval.tipo = (tipoSimple13!=null?tipoSimple13.tipo:null);
                    			retval.linea = (tipoSimple13!=null?tipoSimple13.linea:null);
                    			retval.col = (tipoSimple13!=null?tipoSimple13.col:null);
                    		

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "tipo"

    public static class decl_return extends ParserRuleReturnScope {
        public String trad;
        public Simbolo dec;
        public String fTrad;
    };

    // $ANTLR start "decl"
    // plp4.g:243:1: decl[boolean visibilidad] returns [ String trad, Simbolo dec, String fTrad ] : ( constdecl | vardecl[visibilidad] );
    public final plp4Parser.decl_return decl(boolean visibilidad) throws RecognitionException {
        plp4Parser.decl_return retval = new plp4Parser.decl_return();
        retval.start = input.LT(1);

        plp4Parser.constdecl_return constdecl14 = null;

        plp4Parser.vardecl_return vardecl15 = null;


        retval.trad = "";
        try {
            // plp4.g:244:21: ( constdecl | vardecl[visibilidad] )
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( (LA7_0==CONST) ) {
                alt7=1;
            }
            else if ( (LA7_0==ID||(LA7_0>=INT && LA7_0<=BOOL)) ) {
                alt7=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 7, 0, input);

                throw nvae;
            }
            switch (alt7) {
                case 1 :
                    // plp4.g:245:3: constdecl
                    {
                    pushFollow(FOLLOW_constdecl_in_decl285);
                    constdecl14=constdecl();

                    state._fsp--;


                    			retval.trad = (constdecl14!=null?constdecl14.trad:null);
                    			retval.dec = (constdecl14!=null?constdecl14.dec:null);
                    			retval.fTrad = (constdecl14!=null?constdecl14.fTrad:null);
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:252:3: vardecl[visibilidad]
                    {
                    pushFollow(FOLLOW_vardecl_in_decl297);
                    vardecl15=vardecl(visibilidad);

                    state._fsp--;


                    			retval.fTrad = (vardecl15!=null?vardecl15.fTrad:null);
                    			retval.trad = (vardecl15!=null?vardecl15.trad:null);
                    			retval.dec = (vardecl15!=null?vardecl15.dec:null);
                    		

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "decl"

    public static class constdecl_return extends ParserRuleReturnScope {
        public String trad;
        public Simbolo dec;
        public String fTrad;
    };

    // $ANTLR start "constdecl"
    // plp4.g:260:1: constdecl returns [ String trad, Simbolo dec, String fTrad] : CONST tipoSimple c1= constid[$tipoSimple.tipo] ( COMA c2= constid[$tipoSimple.tipo] )* PYC ;
    public final plp4Parser.constdecl_return constdecl() throws RecognitionException {
        plp4Parser.constdecl_return retval = new plp4Parser.constdecl_return();
        retval.start = input.LT(1);

        plp4Parser.constid_return c1 = null;

        plp4Parser.constid_return c2 = null;

        plp4Parser.tipoSimple_return tipoSimple16 = null;


        retval.trad = ""; StringBuilder salida = new StringBuilder(); retval.fTrad = "";
        try {
            // plp4.g:261:78: ( CONST tipoSimple c1= constid[$tipoSimple.tipo] ( COMA c2= constid[$tipoSimple.tipo] )* PYC )
            // plp4.g:262:2: CONST tipoSimple c1= constid[$tipoSimple.tipo] ( COMA c2= constid[$tipoSimple.tipo] )* PYC
            {
            match(input,CONST,FOLLOW_CONST_in_constdecl322); 
            pushFollow(FOLLOW_tipoSimple_in_constdecl324);
            tipoSimple16=tipoSimple();

            state._fsp--;

            pushFollow(FOLLOW_constid_in_constdecl328);
            c1=constid((tipoSimple16!=null?tipoSimple16.tipo:null));

            state._fsp--;


            		salida.append((c1!=null?c1.trad:null));
            		retval.dec = (c1!=null?c1.dec:null);
            	
            // plp4.g:267:2: ( COMA c2= constid[$tipoSimple.tipo] )*
            loop8:
            do {
                int alt8=2;
                int LA8_0 = input.LA(1);

                if ( (LA8_0==COMA) ) {
                    alt8=1;
                }


                switch (alt8) {
            	case 1 :
            	    // plp4.g:268:3: COMA c2= constid[$tipoSimple.tipo]
            	    {
            	    match(input,COMA,FOLLOW_COMA_in_constdecl339); 
            	    pushFollow(FOLLOW_constid_in_constdecl343);
            	    c2=constid((tipoSimple16!=null?tipoSimple16.tipo:null));

            	    state._fsp--;


            	    			salida.append((c2!=null?c2.trad:null));
            	    		

            	    }
            	    break;

            	default :
            	    break loop8;
                }
            } while (true);

            match(input,PYC,FOLLOW_PYC_in_constdecl355); 

            		retval.trad = salida.toString();
            		retval.fTrad = retval.trad;
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "constdecl"

    public static class constid_return extends ParserRuleReturnScope {
        public String trad;
        public Simbolo dec;
    };

    // $ANTLR start "constid"
    // plp4.g:279:1: constid[Tipo tipo] returns [ String trad, Simbolo dec ] : ID ASIG ( ENTERO | REAL | BOOLEANO ) ;
    public final plp4Parser.constid_return constid(Tipo tipo) throws RecognitionException {
        plp4Parser.constid_return retval = new plp4Parser.constid_return();
        retval.start = input.LT(1);

        Token ID17=null;
        Token ASIG18=null;
        Token ENTERO19=null;
        Token REAL20=null;
        Token BOOLEANO21=null;

        retval.trad = ""; StringBuilder salida = new StringBuilder();
        try {
            // plp4.g:280:65: ( ID ASIG ( ENTERO | REAL | BOOLEANO ) )
            // plp4.g:281:2: ID ASIG ( ENTERO | REAL | BOOLEANO )
            {
            ID17=(Token)match(input,ID,FOLLOW_ID_in_constid377); 
            ASIG18=(Token)match(input,ASIG,FOLLOW_ASIG_in_constid379); 
            // plp4.g:282:2: ( ENTERO | REAL | BOOLEANO )
            int alt9=3;
            switch ( input.LA(1) ) {
            case ENTERO:
                {
                alt9=1;
                }
                break;
            case REAL:
                {
                alt9=2;
                }
                break;
            case BOOLEANO:
                {
                alt9=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 9, 0, input);

                throw nvae;
            }

            switch (alt9) {
                case 1 :
                    // plp4.g:283:4: ENTERO
                    {
                    ENTERO19=(Token)match(input,ENTERO,FOLLOW_ENTERO_in_constid387); 

                    				Simbolo s;
                    				if ( !isCampo )
                    					s = new SimboloEntero((ID17!=null?ID17.getText():null), tipo );
                    				else
                    				{
                    					s = new SimboloCampo((ID17!=null?ID17.getText():null), tipo );
                    					((SimboloCampo)s).setClasePadre(tablaSimbolos.getCurrentClass().getNombre());
                    				}
                    				s.setConstante();
                    				if ( !tablaSimbolos.addSimbolo(s) )
                    				{
                    					StringBuilder err = new StringBuilder();
                    					err.append("Error 1 (").append(ID17.getLine()).append(",").append(ID17.getCharPositionInLine()+1);
                    					err.append("): '").append((ID17!=null?ID17.getText():null)).append("' ya existe en este ambito");
                    					LanzarError(err.toString());
                    				}
                    				if ( !tipo.isEntero() )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 6 (").append(ASIG18.getLine()).append(",").append(ASIG18.getCharPositionInLine()+1);
                    					sb.append(": tipos incompatibles en la instruccion de asignacion");
                    					LanzarError( sb.toString() );
                    				}
                    				if ( !isCampo )
                    				{
                    					salida.append("\tldc.i4 ").append((ENTERO19!=null?ENTERO19.getText():null)).append("\n");
                    					salida.append("\tstloc ").append(s.getLocalPos()).append("\n");
                    				}
                    				else
                    				{
                    					salida.append(".data data_").append(tablaSimbolos.getCurrentClass().getNombre()).append("_").append((ID17!=null?ID17.getText():null)).append(" = int32(").append((ENTERO19!=null?ENTERO19.getText():null)).append(")\n");
                    					salida.append(".field public static int32 '").append((ID17!=null?ID17.getText():null)).append("' at data_").append(tablaSimbolos.getCurrentClass().getNombre()).append("_").append((ID17!=null?ID17.getText():null)).append("\n");
                    				}
                    				retval.trad = salida.toString();
                    				retval.dec = s;
                    			

                    }
                    break;
                case 2 :
                    // plp4.g:322:4: REAL
                    {
                    REAL20=(Token)match(input,REAL,FOLLOW_REAL_in_constid402); 

                    				Simbolo s;
                    				if ( !isCampo )
                    					s = new SimboloReal((ID17!=null?ID17.getText():null), tipo );
                    				else
                    					s = new SimboloCampo((ID17!=null?ID17.getText():null), tipo );
                    				s.setConstante();
                    				s.setConstante();
                    				if ( !tablaSimbolos.addSimbolo(s) )
                    				{
                    					StringBuilder err = new StringBuilder();
                    					err.append("Error 1 (").append(ID17.getLine()).append(",").append(ID17.getCharPositionInLine()+1);
                    					err.append("): '").append((ID17!=null?ID17.getText():null)).append("' ya existe en este ambito");
                    					LanzarError(err.toString());
                    				}
                    				if ( !tipo.isReal() )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 6 (").append(ASIG18.getLine()).append(",").append(ASIG18.getCharPositionInLine()+1);
                    					sb.append(": tipos incompatibles en la instruccion de asignacion");
                    					LanzarError( sb.toString() );
                    				}
                    				salida.append("\tldc.r8 ").append((REAL20!=null?REAL20.getText():null)).append("\n");
                    				salida.append("\tstloc ").append(s.getLocalPos()).append("\n");
                    				retval.trad = salida.toString();
                    				retval.dec = s;
                    			

                    }
                    break;
                case 3 :
                    // plp4.g:351:4: BOOLEANO
                    {
                    BOOLEANO21=(Token)match(input,BOOLEANO,FOLLOW_BOOLEANO_in_constid416); 

                    				Simbolo s;
                    				if ( !isCampo )
                    					s = new SimboloBooleano((ID17!=null?ID17.getText():null), tipo );
                    				else
                    					s = new SimboloCampo((ID17!=null?ID17.getText():null), tipo );
                    				s.setConstante();
                    				if ( !tablaSimbolos.addSimbolo(s) )
                    				{
                    					StringBuilder err = new StringBuilder();
                    					err.append("Error 1 (").append(ID17.getLine()).append(",").append(ID17.getCharPositionInLine()+1);
                    					err.append("): '").append((ID17!=null?ID17.getText():null)).append("' ya existe en este ambito");
                    					LanzarError(err.toString());
                    				}
                    				if ( !tipo.isBoolean() )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 6 (").append(ASIG18.getLine()).append(",").append(ASIG18.getCharPositionInLine()+1);
                    					sb.append(": tipos incompatibles en la instruccion de asignacion");
                    					LanzarError( sb.toString() );
                    				}
                    				salida.append("ldc.i4 ");
                    				if ( (BOOLEANO21!=null?BOOLEANO21.getText():null).equals("True") )
                    				{
                    					salida.append("1\n");
                    				}
                    				else
                    				{
                    					salida.append("0\n");
                    				}
                    				salida.append("stloc ").append(s.getLocalPos()).append("\n");
                    				retval.trad = salida.toString();
                    				retval.dec = s;
                    			

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "constid"

    public static class vardecl_return extends ParserRuleReturnScope {
        public String trad;
        public Simbolo dec;
        public String fTrad;
    };

    // $ANTLR start "vardecl"
    // plp4.g:388:1: vardecl[boolean visibilidad] returns [ String trad, Simbolo dec, String fTrad ] : tipo v1= varid[$tipo.tipo, visibilidad] ( COMA v2= varid[$tipo.tipo, visibilidad] )* PYC ;
    public final plp4Parser.vardecl_return vardecl(boolean visibilidad) throws RecognitionException {
        plp4Parser.vardecl_return retval = new plp4Parser.vardecl_return();
        retval.start = input.LT(1);

        Simbolo v1 = null;

        Simbolo v2 = null;

        plp4Parser.tipo_return tipo22 = null;


        StringBuilder salida = new StringBuilder(); retval.trad = ""; retval.fTrad = "";
        try {
            // plp4.g:389:78: ( tipo v1= varid[$tipo.tipo, visibilidad] ( COMA v2= varid[$tipo.tipo, visibilidad] )* PYC )
            // plp4.g:390:2: tipo v1= varid[$tipo.tipo, visibilidad] ( COMA v2= varid[$tipo.tipo, visibilidad] )* PYC
            {
            pushFollow(FOLLOW_tipo_in_vardecl443);
            tipo22=tipo();

            state._fsp--;

            pushFollow(FOLLOW_varid_in_vardecl447);
            v1=varid((tipo22!=null?tipo22.tipo:null), visibilidad);

            state._fsp--;


            		retval.dec = v1;
            		salida.append(retval.dec.toString());
            	
            // plp4.g:395:2: ( COMA v2= varid[$tipo.tipo, visibilidad] )*
            loop10:
            do {
                int alt10=2;
                int LA10_0 = input.LA(1);

                if ( (LA10_0==COMA) ) {
                    alt10=1;
                }


                switch (alt10) {
            	case 1 :
            	    // plp4.g:396:3: COMA v2= varid[$tipo.tipo, visibilidad]
            	    {
            	    match(input,COMA,FOLLOW_COMA_in_vardecl458); 
            	    pushFollow(FOLLOW_varid_in_vardecl462);
            	    v2=varid((tipo22!=null?tipo22.tipo:null), visibilidad);

            	    state._fsp--;


            	    			salida.append(v2.toString());
            	    		

            	    }
            	    break;

            	default :
            	    break loop10;
                }
            } while (true);

            match(input,PYC,FOLLOW_PYC_in_vardecl474); 

            		retval.fTrad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "vardecl"


    // $ANTLR start "varid"
    // plp4.g:406:1: varid[Tipo tipo, boolean visibilidad] returns [Simbolo dec] : ID ( CORI ( COMA )* CORD )? ;
    public final Simbolo varid(Tipo tipo, boolean visibilidad) throws RecognitionException {
        Simbolo dec = null;

        Token ID23=null;
        Token CORI24=null;

        Tipo tipoFinal;Simbolo s = null;
        try {
            // plp4.g:407:42: ( ID ( CORI ( COMA )* CORD )? )
            // plp4.g:408:2: ID ( CORI ( COMA )* CORD )?
            {
            ID23=(Token)match(input,ID,FOLLOW_ID_in_varid496); 

            		if ( !isCampo )
            		{
            			if ( tipo.isEntero() )
            			{
            				s = new SimboloEntero((ID23!=null?ID23.getText():null), tipo);
            			}
            			else if ( tipo.isReal() )
            			{
            				s = new SimboloReal((ID23!=null?ID23.getText():null), tipo);
            			}
            			else if ( tipo.isBoolean() )
            			{
            				s = new SimboloBooleano((ID23!=null?ID23.getText():null), tipo);
            			}
            			else if ( tipo.isClass() )
            			{
            				s = new SimboloObjeto((ID23!=null?ID23.getText():null), tipo);
            			}
            		}	
            		else
            		{
            			s = new SimboloCampo((ID23!=null?ID23.getText():null), tipo);
            			((SimboloCampo)s).setClasePadre(tablaSimbolos.getCurrentClass().getNombre());
            			s.setVisibilidad(visibilidad);
            		}
            		dec = s;
            	
            // plp4.g:437:2: ( CORI ( COMA )* CORD )?
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0==CORI) ) {
                alt12=1;
            }
            switch (alt12) {
                case 1 :
                    // plp4.g:438:3: CORI ( COMA )* CORD
                    {
                    CORI24=(Token)match(input,CORI,FOLLOW_CORI_in_varid506); 

                    			if ( s.isObjeto() )
                    			{
                    				StringBuilder err = new StringBuilder();
                    				err.append("Error 29 (").append(CORI24.getLine()).append(",").append(CORI24.getCharPositionInLine()+1);
                    				err.append("): no se permite la declaracion de arrays de objetos");
                    				LanzarError(err.toString());
                    			}
                    			tipoFinal = new TipoArray(tipo, null);
                    			s.setTipo(tipoFinal);
                    		
                    // plp4.g:450:3: ( COMA )*
                    loop11:
                    do {
                        int alt11=2;
                        int LA11_0 = input.LA(1);

                        if ( (LA11_0==COMA) ) {
                            alt11=1;
                        }


                        switch (alt11) {
                    	case 1 :
                    	    // plp4.g:451:4: COMA
                    	    {

                    	    				TipoArray t = new TipoArray(tipoFinal, null);
                    	    				tipoFinal = t;
                    	    				s.setTipo(tipoFinal);
                    	    			
                    	    match(input,COMA,FOLLOW_COMA_in_varid524); 

                    	    }
                    	    break;

                    	default :
                    	    break loop11;
                        }
                    } while (true);

                    match(input,CORD,FOLLOW_CORD_in_varid533); 

                    }
                    break;

            }


            		if ( !tablaSimbolos.addSimbolo(s) )
            		{
            			StringBuilder err = new StringBuilder();
            			err.append("Error 1 (").append(ID23.getLine()).append(",").append(ID23.getCharPositionInLine()+1);
            			err.append("): '").append((ID23!=null?ID23.getText():null)).append("' ya existe en este ambito");
            			LanzarError(err.toString());
            		}
            	

            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return dec;
    }
    // $ANTLR end "varid"


    // $ANTLR start "declins"
    // plp4.g:470:1: declins returns [ String trad ] : ( instr[true] | decl[true] )* ;
    public final String declins() throws RecognitionException {
        String trad = null;

        String instr25 = null;

        plp4Parser.decl_return decl26 = null;


        StringBuilder salida = new StringBuilder(); trad = "";
        try {
            // plp4.g:471:64: ( ( instr[true] | decl[true] )* )
            // plp4.g:472:2: ( instr[true] | decl[true] )*
            {
            // plp4.g:472:2: ( instr[true] | decl[true] )*
            loop13:
            do {
                int alt13=3;
                switch ( input.LA(1) ) {
                case LLAVEI:
                case IF:
                case WHILE:
                case FOR:
                case BREAK:
                case CONTINUE:
                case WRITELINE:
                case TRY:
                case THROW:
                case EXPLAIN:
                case RETURN:
                    {
                    alt13=1;
                    }
                    break;
                case ID:
                    {
                    int LA13_3 = input.LA(2);

                    if ( (LA13_3==PARI||LA13_3==ASIG||LA13_3==CORI||LA13_3==PUNTO) ) {
                        alt13=1;
                    }
                    else if ( (LA13_3==ID) ) {
                        alt13=2;
                    }


                    }
                    break;
                case INT:
                case DOUBLE:
                case BOOL:
                case CONST:
                    {
                    alt13=2;
                    }
                    break;

                }

                switch (alt13) {
            	case 1 :
            	    // plp4.g:473:3: instr[true]
            	    {
            	    pushFollow(FOLLOW_instr_in_declins562);
            	    instr25=instr(true);

            	    state._fsp--;


            	    			salida.append(instr25);
            	    		

            	    }
            	    break;
            	case 2 :
            	    // plp4.g:478:3: decl[true]
            	    {
            	    pushFollow(FOLLOW_decl_in_declins575);
            	    decl26=decl(true);

            	    state._fsp--;


            	    			salida.append((decl26!=null?decl26.trad:null));
            	    		

            	    }
            	    break;

            	default :
            	    break loop13;
                }
            } while (true);


            		trad = salida.toString();
            	

            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "declins"

    public static class bloque_return extends ParserRuleReturnScope {
        public String trad;
        public String locals;
    };

    // $ANTLR start "bloque"
    // plp4.g:487:1: bloque[boolean pop, boolean isMetodo] returns [ String trad, String locals ] : LLAVEI declins LLAVED ;
    public final plp4Parser.bloque_return bloque(boolean pop, boolean isMetodo) throws RecognitionException {
        plp4Parser.bloque_return retval = new plp4Parser.bloque_return();
        retval.start = input.LT(1);

        String declins27 = null;


        StringBuilder salida = new StringBuilder(); retval.trad = ""; retval.locals = "";
        try {
            // plp4.g:489:79: ( LLAVEI declins LLAVED )
            // plp4.g:490:2: LLAVEI declins LLAVED
            {
            match(input,LLAVEI,FOLLOW_LLAVEI_in_bloque606); 

            		if ( isMetodo )
            		{
            			tablaSimbolos = tablaSimbolos.pushMetodo();
            		}
            		else if ( pop )
            		{
            			tablaSimbolos = tablaSimbolos.push();
            		}
            	
            pushFollow(FOLLOW_declins_in_bloque612);
            declins27=declins();

            state._fsp--;


            		retval.trad = declins27;
            	
            match(input,LLAVED,FOLLOW_LLAVED_in_bloque618); 

            		if ( isMetodo )
            		{
            			retval.locals = tablaSimbolos.getLocalsValue();
            			tablaSimbolos = tablaSimbolos.popMetodo();
            		}
            		else if ( pop )
            		{
            			tablaSimbolos = tablaSimbolos.pop();
            		}
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "bloque"


    // $ANTLR start "instr"
    // plp4.g:518:1: instr[boolean pop] returns [ String trad ] : ( bloque[pop, false] | IF PARI e3= expr[null] PARD i1= instr[true] ( ELSE i2= instr[true] )? | WHILE PARI e4= expr[null] PARD i3= instr[true] | FOR PARI INT ID ASIG e1= expr[s] TO e2= expr[null] STEP ( ADDOP )? ENTERO PARD i4= instr[false] | BREAK PYC | CONTINUE PYC | ref[\"cambio\"] cambio[$ref.s, $ref.trad, $ref.sInicio, $ref.cont] | ID ASIG NEW tipoSimple CORI dims[tArray] CORD PYC | WRITELINE PARI ex1= expr[null] PARD PYC | TRY b2= bloque[true, false] bloquecatch[pilaEtiquetas.peek()] | THROW ( NEW EXCEPTION PARI ex2= expr[null] PARD )? PYC | EXPLAIN ID PYC | RETURN exa= expr[null] PYC | id1= ID ASIG NEW id2= ID PARI params[$PARI] PARD PYC | subref[0] PARI params[$PARI] PARD PYC );
    public final String instr(boolean pop) throws RecognitionException {
        String trad = null;

        Token id1=null;
        Token id2=null;
        Token IF29=null;
        Token WHILE30=null;
        Token ID31=null;
        Token TO32=null;
        Token ADDOP33=null;
        Token ENTERO34=null;
        Token BREAK35=null;
        Token CONTINUE36=null;
        Token ID39=null;
        Token CORD42=null;
        Token WRITELINE43=null;
        Token TRY44=null;
        Token NEW46=null;
        Token EXPLAIN47=null;
        Token ID48=null;
        Token RETURN49=null;
        Token PARI50=null;
        Token PARI52=null;
        plp4Parser.expr_return e3 = null;

        String i1 = null;

        String i2 = null;

        plp4Parser.expr_return e4 = null;

        String i3 = null;

        plp4Parser.expr_return e1 = null;

        plp4Parser.expr_return e2 = null;

        String i4 = null;

        plp4Parser.expr_return ex1 = null;

        plp4Parser.bloque_return b2 = null;

        plp4Parser.expr_return ex2 = null;

        plp4Parser.expr_return exa = null;

        plp4Parser.bloque_return bloque28 = null;

        plp4Parser.ref_return ref37 = null;

        String cambio38 = null;

        plp4Parser.tipoSimple_return tipoSimple40 = null;

        int dims41 = 0;

        String bloquecatch45 = null;

        plp4Parser.params_return params51 = null;

        plp4Parser.subref_return subref53 = null;

        plp4Parser.params_return params54 = null;


        StringBuilder salida = new StringBuilder(); trad = "";
        try {
            // plp4.g:519:64: ( bloque[pop, false] | IF PARI e3= expr[null] PARD i1= instr[true] ( ELSE i2= instr[true] )? | WHILE PARI e4= expr[null] PARD i3= instr[true] | FOR PARI INT ID ASIG e1= expr[s] TO e2= expr[null] STEP ( ADDOP )? ENTERO PARD i4= instr[false] | BREAK PYC | CONTINUE PYC | ref[\"cambio\"] cambio[$ref.s, $ref.trad, $ref.sInicio, $ref.cont] | ID ASIG NEW tipoSimple CORI dims[tArray] CORD PYC | WRITELINE PARI ex1= expr[null] PARD PYC | TRY b2= bloque[true, false] bloquecatch[pilaEtiquetas.peek()] | THROW ( NEW EXCEPTION PARI ex2= expr[null] PARD )? PYC | EXPLAIN ID PYC | RETURN exa= expr[null] PYC | id1= ID ASIG NEW id2= ID PARI params[$PARI] PARD PYC | subref[0] PARI params[$PARI] PARD PYC )
            int alt17=15;
            alt17 = dfa17.predict(input);
            switch (alt17) {
                case 1 :
                    // plp4.g:520:3: bloque[pop, false]
                    {
                    pushFollow(FOLLOW_bloque_in_instr641);
                    bloque28=bloque(pop, false);

                    state._fsp--;


                    			trad = (bloque28!=null?bloque28.trad:null);
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:525:3: IF PARI e3= expr[null] PARD i1= instr[true] ( ELSE i2= instr[true] )?
                    {
                    IF29=(Token)match(input,IF,FOLLOW_IF_in_instr654); 
                    match(input,PARI,FOLLOW_PARI_in_instr656); 
                    pushFollow(FOLLOW_expr_in_instr660);
                    e3=expr(null);

                    state._fsp--;


                    			if ( (e3!=null?e3.sr:null) != null && !(e3!=null?e3.sr:null).isBooleano() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 5 (").append(IF29.getLine()).append(",").append(IF29.getCharPositionInLine()+1).append("):");
                    				sb.append(" la expresion debe ser de tipo booleano en la instruccion '");
                    				sb.append((IF29!=null?IF29.getText():null)).append("'");
                    				LanzarError( sb.toString() );
                    			}
                    			salida.append((e3!=null?e3.trad:null));
                    			salida.append("\tldc.i4.0\n").append("\tbeq L").append(numEtiq).append(" //SALTO SI FALSO\n"); //Si falso saltar
                    			pilaEtiquetas.push(numEtiq);
                    			numEtiq++;
                    		
                    match(input,PARD,FOLLOW_PARD_in_instr669); 
                    pushFollow(FOLLOW_instr_in_instr673);
                    i1=instr(true);

                    state._fsp--;


                    			int etiq = pilaEtiquetas.pop();
                    			salida.append(i1);
                    			salida.append("\tbr L").append(etiq).append("FIN //FIN IF NO ESTRAR ELSE\n");
                    			salida.append("\tL").append(etiq).append(": //ELSE\n");
                    		
                    // plp4.g:547:3: ( ELSE i2= instr[true] )?
                    int alt14=2;
                    int LA14_0 = input.LA(1);

                    if ( (LA14_0==ELSE) ) {
                        alt14=1;
                    }
                    switch (alt14) {
                        case 1 :
                            // plp4.g:548:4: ELSE i2= instr[true]
                            {
                            match(input,ELSE,FOLLOW_ELSE_in_instr687); 
                            pushFollow(FOLLOW_instr_in_instr691);
                            i2=instr(true);

                            state._fsp--;


                            				salida.append(i2);
                            			

                            }
                            break;

                    }


                    			salida.append("\tL").append(etiq).append("FIN: //FIN ELSE\n");
                    			numEtiq++;
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 3 :
                    // plp4.g:559:3: WHILE PARI e4= expr[null] PARD i3= instr[true]
                    {
                    WHILE30=(Token)match(input,WHILE,FOLLOW_WHILE_in_instr713); 
                    match(input,PARI,FOLLOW_PARI_in_instr715); 
                    pushFollow(FOLLOW_expr_in_instr719);
                    e4=expr(null);

                    state._fsp--;


                    			if (  (e4!=null?e4.sr:null) != null && !(e4!=null?e4.sr:null).isBooleano() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 5 (").append(WHILE30.getLine()).append(",").append(WHILE30.getCharPositionInLine()+1).append("):");
                    				sb.append(" la expresion debe ser de tipo booleano en la instruccion '");
                    				sb.append((WHILE30!=null?WHILE30.getText():null)).append("'");
                    				LanzarError( sb.toString() );
                    			}
                    			int etiq = numEtiq;
                    			salida.append("\tW").append(numEtiq).append(": //BUCLE WHILE \n");
                    			pilaBucles.push("W" + numEtiq);
                    			numEtiq++;
                    			salida.append((e4!=null?e4.trad:null));
                    			salida.append("\tldc.i4.0\n").append("\tbeq W").append(etiq).append("FIN //COMPROBAR CONDICION WHILE\n"); //Si falso saltar
                    		
                    match(input,PARD,FOLLOW_PARD_in_instr728); 
                    pushFollow(FOLLOW_instr_in_instr732);
                    i3=instr(true);

                    state._fsp--;


                    			salida.append(i3);
                    			salida.append("\tbr W").append(etiq).append(" //SIGUIENTE ITERACION DE WHILE\n");
                    			salida.append("\tW").append(etiq).append("FIN: //FIN WHILE\n");
                    			trad = salida.toString();
                    			pilaBucles.pop();
                    		

                    }
                    break;
                case 4 :
                    // plp4.g:585:3: FOR PARI INT ID ASIG e1= expr[s] TO e2= expr[null] STEP ( ADDOP )? ENTERO PARD i4= instr[false]
                    {
                    match(input,FOR,FOLLOW_FOR_in_instr744); 
                    match(input,PARI,FOLLOW_PARI_in_instr746); 
                    match(input,INT,FOLLOW_INT_in_instr748); 
                    ID31=(Token)match(input,ID,FOLLOW_ID_in_instr750); 

                    			tablaSimbolos = tablaSimbolos.push();
                    			Simbolo s = new SimboloEntero((ID31!=null?ID31.getText():null));
                    			s.setConstante();
                    			if ( !tablaSimbolos.addSimbolo(s) )
                    			{
                    				StringBuilder err = new StringBuilder();
                    				err.append("Error 1 (").append(ID31.getLine()).append(",").append(ID31.getCharPositionInLine()+1);
                    				err.append("): '").append((ID31!=null?ID31.getText():null)).append("' ya existe en este ambito");
                    				LanzarError(err.toString());
                    			}
                    		
                    match(input,ASIG,FOLLOW_ASIG_in_instr759); 
                    pushFollow(FOLLOW_expr_in_instr763);
                    e1=expr(s);

                    state._fsp--;

                    TO32=(Token)match(input,TO,FOLLOW_TO_in_instr766); 
                    pushFollow(FOLLOW_expr_in_instr770);
                    e2=expr(null);

                    state._fsp--;

                    match(input,STEP,FOLLOW_STEP_in_instr773); 
                    // plp4.g:598:41: ( ADDOP )?
                    int alt15=2;
                    int LA15_0 = input.LA(1);

                    if ( (LA15_0==ADDOP) ) {
                        alt15=1;
                    }
                    switch (alt15) {
                        case 1 :
                            // plp4.g:598:42: ADDOP
                            {
                            ADDOP33=(Token)match(input,ADDOP,FOLLOW_ADDOP_in_instr776); 

                            }
                            break;

                    }

                    ENTERO34=(Token)match(input,ENTERO,FOLLOW_ENTERO_in_instr780); 
                    match(input,PARD,FOLLOW_PARD_in_instr782); 

                    			if ( (e2!=null?e2.trad:null).lastIndexOf("clt") != -1 || (e2!=null?e2.trad:null).lastIndexOf("cgt") != -1 || (e2!=null?e2.trad:null).lastIndexOf("ceq") != -1   )
                    			{
                    				StringBuilder err = new StringBuilder();
                    				err.append("Error 17 (").append(TO32.getLine()).append(",").append(TO32.getCharPositionInLine()+1);
                    				err.append("): la expresion debe ser de tipo numerico");
                    				LanzarError(err.toString());
                    			}
                    			pilaBucles.push("F" + numEtiq);
                    			numEtiq++;
                    		
                    pushFollow(FOLLOW_instr_in_instr792);
                    i4=instr(false);

                    state._fsp--;


                    			salida.append((e1!=null?e1.trad:null));
                    			salida.append("\tconv.i\n");
                    			salida.append("\tstloc ").append(s.getLocalPos()).append(" //ASIGNACION DEL FOR\n");
                    			
                    			String etiq = pilaBucles.pop();
                    			salida.append(etiq).append(": //INICIO BUCLE FOR \n");
                    			salida.append((e2!=null?e2.trad:null));
                    			salida.append("\tldloc ").append(s.getLocalPos()).append("\n");
                    			if ( (e2!=null?e2.sr:null).isReal() )
                    			{
                    				salida.append("\tconv.r8 \n");
                    			}
                    			if ( ADDOP33 != null && (ADDOP33!=null?ADDOP33.getText():null).equals("-"))
                    			{
                    				salida.append("\tcgt\n\tldc.i4.1\n\txor //MIETRAS ITERADOR > CONDICION \n");
                    			}
                    			else
                    			{
                    				salida.append("\tclt\n\tldc.i4.1\n\txor //MIENTRAS ITERADOR < CONDICION \n");
                    			}
                    			salida.append("\tldc.i4.0\n").append("\tbeq ").append(etiq).append("FIN //COMPROBAR CONDICION FOR\n"); //Si falso saltar
                    			salida.append(i4);
                    			salida.append(etiq).append("INC: //INCREMETO DEL ITERADOR\n");
                    			salida.append("\tldloc ").append(s.getLocalPos()).append("\n");
                    			salida.append("\tldc.i4 ").append((ENTERO34!=null?ENTERO34.getText():null)).append("\n");
                    			if ( ADDOP33 != null && (ADDOP33!=null?ADDOP33.getText():null).equals("-"))
                    			{
                    				salida.append("\tsub\n");
                    			}
                    			else
                    			{
                    				salida.append("\tadd\n");
                    			}
                    			salida.append("\tstloc ").append(s.getLocalPos()).append("\n");
                    			salida.append("\tbr ").append(etiq).append("\n");
                    			salida.append(etiq).append("FIN: //FIN BUCLE FOR\n");
                    			trad = salida.toString();
                    			tablaSimbolos = tablaSimbolos.pop();
                    		

                    }
                    break;
                case 5 :
                    // plp4.g:652:3: BREAK PYC
                    {
                    BREAK35=(Token)match(input,BREAK,FOLLOW_BREAK_in_instr804); 
                    match(input,PYC,FOLLOW_PYC_in_instr806); 

                    			if ( pilaBucles.empty() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 16 (").append(BREAK35.getLine()).append(",").append(BREAK35.getCharPositionInLine()+1);
                    				sb.append("): instruccion '");
                    				sb.append((BREAK35!=null?BREAK35.getText():null)).append("' no permitida fuera de un bucle");
                    				LanzarError( sb.toString() );
                    			}
                    			else
                    			{
                    				salida.append("\tbr ").append(pilaBucles.peek()).append("FIN\n");
                    				trad = salida.toString();
                    			}
                    		

                    }
                    break;
                case 6 :
                    // plp4.g:669:3: CONTINUE PYC
                    {
                    CONTINUE36=(Token)match(input,CONTINUE,FOLLOW_CONTINUE_in_instr817); 
                    match(input,PYC,FOLLOW_PYC_in_instr819); 

                    			if ( pilaBucles.empty() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 16 (").append(CONTINUE36.getLine()).append(",").append(CONTINUE36.getCharPositionInLine()+1);
                    				sb.append("): instruccion '");
                    				sb.append((CONTINUE36!=null?CONTINUE36.getText():null)).append("' no permitida fuera de un bucle");
                    				LanzarError( sb.toString() );
                    			}
                    			else
                    			{
                    				String salto = pilaBucles.peek();
                    				if ( salto.charAt(0) == 'F' )
                    				{
                    					salida.append("\tbr ").append(pilaBucles.peek()).append("INC\n");
                    				}
                    				else
                    				{
                    					salida.append("\tbr ").append(pilaBucles.peek()).append("\n");
                    				}
                    				trad = salida.toString();
                    			}
                    		

                    }
                    break;
                case 7 :
                    // plp4.g:694:3: ref[\"cambio\"] cambio[$ref.s, $ref.trad, $ref.sInicio, $ref.cont]
                    {
                    pushFollow(FOLLOW_ref_in_instr830);
                    ref37=ref("cambio");

                    state._fsp--;

                    pushFollow(FOLLOW_cambio_in_instr833);
                    cambio38=cambio((ref37!=null?ref37.s:null), (ref37!=null?ref37.trad:null), (ref37!=null?ref37.sInicio:null), (ref37!=null?ref37.cont:0));

                    state._fsp--;


                    			if ( (ref37!=null?ref37.s:null).isProperty()  )
                    			{
                    				if ( funcionActual == null )
                    					salida.append("\n\tldloc ").append((ref37!=null?ref37.sInicio:null).getLocalPos()).append("\n");
                    				else
                    					salida.append("\n\tldarg 0\n");
                    			}
                    			salida.append(cambio38);
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 8 :
                    // plp4.g:707:3: ID ASIG NEW tipoSimple CORI dims[tArray] CORD PYC
                    {
                    ID39=(Token)match(input,ID,FOLLOW_ID_in_instr845); 

                    			Simbolo s = tablaSimbolos.getSimbolo((ID39!=null?ID39.getText():null));
                    			if ( s == null )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 2 (").append(ID39.getLine()).append(",").append(ID39.getCharPositionInLine()+1).append("): simbolo '");
                    				sb.append((ID39!=null?ID39.getText():null)).append("' no ha sido declarado");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( s.getTipo() == null || !s.getTipo().isArray() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 11 (").append(ID39.getLine()).append(",").append(ID39.getCharPositionInLine()+1).append("): el identificador '");
                    				sb.append((ID39!=null?ID39.getText():null));
                    				sb.append("' no es de tipo array");
                    				LanzarError( sb.toString() );
                    			}
                    		
                    match(input,ASIG,FOLLOW_ASIG_in_instr853); 
                    match(input,NEW,FOLLOW_NEW_in_instr855); 
                    pushFollow(FOLLOW_tipoSimple_in_instr857);
                    tipoSimple40=tipoSimple();

                    state._fsp--;


                    			Tipo t = (tipoSimple40!=null?tipoSimple40.tipo:null);
                    			if ( !t.getNombre().equals(s.getTipo().getTipoSimple().getNombre()) )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 14 (").append((tipoSimple40!=null?tipoSimple40.linea:null)).append(",").append((tipoSimple40!=null?tipoSimple40.col:null));
                    				sb.append("): tipo '");
                    				sb.append(t.getNombre());
                    				sb.append("' incompatible con la declaracion");
                    				LanzarError( sb.toString() );
                    			}
                    			TipoArray tArray = (TipoArray)s.getTipo();
                    		
                    match(input,CORI,FOLLOW_CORI_in_instr865); 
                    pushFollow(FOLLOW_dims_in_instr867);
                    dims41=dims(tArray);

                    state._fsp--;

                    CORD42=(Token)match(input,CORD,FOLLOW_CORD_in_instr870); 

                    			if ( tArray.getDimensiones() > dims41)
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 10 (").append(CORD42.getLine()).append(",").append(CORD42.getCharPositionInLine()+1);
                    				sb.append("): numero de dimensiones incorrecto");
                    				LanzarError( sb.toString() );
                    			}
                    			tArray.setInicializado();
                    			if ( s.isCampo() )
                    				salida.append("\tldarg 0\n");
                    			salida.append("\tldc.i4 ").append(tArray.getTotalSize()).append(" //TAMAÑO DEL VECTOR ").append(s.getNombre()).append(" \n");
                    			salida.append("\tnewarr [mscorlib]System.").append(tArray.getTipoSimpleString()).append(" //RESERVA DE MEMORIA DEL VECTOR\n");
                    			if ( s.isCampo() )
                    			{
                    				salida.append("\n\tstfld ").append(s.toWrite()).append(" '").append(((SimboloCampo)s).getClasePadre()).append("'::'");
                    				salida.append(s.getNombre()).append("'\n");
                    			}
                    			else
                    				salida.append("\tstloc ").append(s.getLocalPos()).append("\n");
                    			trad = salida.toString();
                    		
                    match(input,PYC,FOLLOW_PYC_in_instr878); 

                    }
                    break;
                case 9 :
                    // plp4.g:765:3: WRITELINE PARI ex1= expr[null] PARD PYC
                    {
                    WRITELINE43=(Token)match(input,WRITELINE,FOLLOW_WRITELINE_in_instr885); 
                    match(input,PARI,FOLLOW_PARI_in_instr887); 
                    pushFollow(FOLLOW_expr_in_instr891);
                    ex1=expr(null);

                    state._fsp--;


                    			salida.append((ex1!=null?ex1.trad:null));
                    			salida.append("\tcall void [mscorlib]System.Console::WriteLine(");
                    			salida.append((ex1!=null?ex1.cima:null)).append(")\n");
                    			trad = salida.toString();
                    			if ( (ex1!=null?ex1.sr:null).isObjeto() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 32 (").append(WRITELINE43.getLine()).append(",").append(WRITELINE43.getCharPositionInLine()+1);
                    				sb.append("): la referencia es de tipo objeto");
                    				LanzarError( sb.toString() );
                    			}
                    		
                    match(input,PARD,FOLLOW_PARD_in_instr900); 
                    match(input,PYC,FOLLOW_PYC_in_instr902); 

                    }
                    break;
                case 10 :
                    // plp4.g:781:3: TRY b2= bloque[true, false] bloquecatch[pilaEtiquetas.peek()]
                    {
                    TRY44=(Token)match(input,TRY,FOLLOW_TRY_in_instr909); 

                    			pilaEtiquetas.push(numEtiq);
                    			numEtiq++;
                    		if ( !pilaCatch.empty() )
                    		{
                    			StringBuilder sb = new StringBuilder();
                    			sb.append("Error 18 (").append(TRY44.getLine()).append(",").append(TRY44.getCharPositionInLine()+1);
                    			sb.append("): sentencia '");
                    			sb.append((TRY44!=null?TRY44.getText():null));
                    			sb.append("' no permitida en este ambito");
                    			LanzarError( sb.toString() );
                    		}
                    		
                    pushFollow(FOLLOW_bloque_in_instr919);
                    b2=bloque(true, false);

                    state._fsp--;

                    pushFollow(FOLLOW_bloquecatch_in_instr922);
                    bloquecatch45=bloquecatch(pilaEtiquetas.peek());

                    state._fsp--;


                    			salida.append("\t.try\n{\n");
                    			salida.append((b2!=null?b2.trad:null));
                    			salida.append("\tleave L").append(pilaEtiquetas.pop()).append("\n}\n");
                    			salida.append(bloquecatch45);
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 11 :
                    // plp4.g:804:3: THROW ( NEW EXCEPTION PARI ex2= expr[null] PARD )? PYC
                    {
                    match(input,THROW,FOLLOW_THROW_in_instr934); 
                    // plp4.g:804:9: ( NEW EXCEPTION PARI ex2= expr[null] PARD )?
                    int alt16=2;
                    int LA16_0 = input.LA(1);

                    if ( (LA16_0==NEW) ) {
                        alt16=1;
                    }
                    switch (alt16) {
                        case 1 :
                            // plp4.g:804:11: NEW EXCEPTION PARI ex2= expr[null] PARD
                            {
                            NEW46=(Token)match(input,NEW,FOLLOW_NEW_in_instr938); 
                            match(input,EXCEPTION,FOLLOW_EXCEPTION_in_instr940); 
                            match(input,PARI,FOLLOW_PARI_in_instr942); 
                            pushFollow(FOLLOW_expr_in_instr946);
                            ex2=expr(null);

                            state._fsp--;

                            match(input,PARD,FOLLOW_PARD_in_instr949); 

                            }
                            break;

                    }

                    match(input,PYC,FOLLOW_PYC_in_instr954); 

                    			if ( NEW46 == null )
                    			{
                    				trad = "\trethrow\n";
                    			}
                    			else
                    			{
                    				salida.append((ex2!=null?ex2.trad:null));
                    				salida.append("\tcall string [mscorlib]System.Convert::ToString(").append((ex2!=null?ex2.cima:null)).append(")\n");
                    				salida.append("\tnewobj instance void [mscorlib]System.Exception::.ctor(string)\n");
                    				salida.append("\tthrow\n");
                    				trad = salida.toString();
                    			}
                    		

                    }
                    break;
                case 12 :
                    // plp4.g:820:3: EXPLAIN ID PYC
                    {
                    EXPLAIN47=(Token)match(input,EXPLAIN,FOLLOW_EXPLAIN_in_instr966); 
                    ID48=(Token)match(input,ID,FOLLOW_ID_in_instr968); 
                    match(input,PYC,FOLLOW_PYC_in_instr970); 

                    			if ( pilaCatch.empty() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 18 (").append(EXPLAIN47.getLine()).append(",").append(EXPLAIN47.getCharPositionInLine()+1);
                    				sb.append("): sentencia '");
                    				sb.append((EXPLAIN47!=null?EXPLAIN47.getText():null));
                    				sb.append("' no permitida en este ambito");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( !tablaSimbolos.getSimbolo((ID48!=null?ID48.getText():null)).isExcepcion() ) 
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 19 (").append(ID48.getLine()).append(",").append(ID48.getCharPositionInLine()+1);
                    				sb.append("): '");
                    				sb.append((ID48!=null?ID48.getText():null));
                    				sb.append("' no es una excepcion");
                    				LanzarError( sb.toString() );
                    			}
                    			salida.append("\tdup\n");
                    			salida.append("\tcall instance string [mscorlib]System.Exception::get_Message()\n");
                    			salida.append("\tcall void [mscorlib]System.Console::WriteLine(string)\n");
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 13 :
                    // plp4.g:846:3: RETURN exa= expr[null] PYC
                    {
                    RETURN49=(Token)match(input,RETURN,FOLLOW_RETURN_in_instr981); 

                    			if ( funcionActual == null && propertyActual == null  )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 26 (").append(RETURN49.getLine()).append(",").append(RETURN49.getCharPositionInLine()+1).append("): aqui no puede usarse return");
                    				LanzarError( sb.toString() );
                    			}
                    		
                    pushFollow(FOLLOW_expr_in_instr991);
                    exa=expr(null);

                    state._fsp--;

                    match(input,PYC,FOLLOW_PYC_in_instr996); 

                    			if ( funcionActual != null )
                    			{
                    				funcionActual.setHasReturn(true);
                    				if ( !funcionActual.compatible((exa!=null?exa.sr:null)) )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 27 (").append(RETURN49.getLine()).append(",").append(RETURN49.getCharPositionInLine()+1).append("): valor devuelto de tipo incompatible");
                    					LanzarError( sb.toString() );
                    				}
                    			}
                    			salida.append((exa!=null?exa.trad:null));
                    			salida.append("\tret\n");
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 14 :
                    // plp4.g:873:3: id1= ID ASIG NEW id2= ID PARI params[$PARI] PARD PYC
                    {
                    id1=(Token)match(input,ID,FOLLOW_ID_in_instr1009); 
                    match(input,ASIG,FOLLOW_ASIG_in_instr1011); 
                    match(input,NEW,FOLLOW_NEW_in_instr1013); 
                    id2=(Token)match(input,ID,FOLLOW_ID_in_instr1017); 
                    PARI50=(Token)match(input,PARI,FOLLOW_PARI_in_instr1019); 
                    pushFollow(FOLLOW_params_in_instr1021);
                    params51=params(PARI50);

                    state._fsp--;

                    match(input,PARD,FOLLOW_PARD_in_instr1024); 
                    match(input,PYC,FOLLOW_PYC_in_instr1026); 

                    			Simbolo sc = tablaSimbolos.getSimbolo((id1!=null?id1.getText():null)) ;
                    			if ( sc == null )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 2 (").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): simbolo '");
                    				sb.append((id1!=null?id1.getText():null)).append("' no ha sido declarado");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( isMain && sc.isCampo() || sc.isProperty() || sc.isFuncion() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 31 (").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): miembro '");
                    				sb.append((id1!=null?id1.getText():null)).append("' no accesible desde Main");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( !sc.getTipo().getNombre().equals((id2!=null?id2.getText():null)) )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 30 (").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): objeto '");
                    				sb.append((id1!=null?id1.getText():null)).append("' no es de clase '").append((id2!=null?id2.getText():null)).append("'");
                    				LanzarError( sb.toString() );
                    			}

                    			if ( sc.isObjeto() )
                    				((SimboloObjeto)sc).init();
                    			else
                    				((SimboloCampo)sc).init();
                    			salida.append((params51!=null?params51.trad:null));
                    			salida.append("\tnewobj instance void '").append((id2!=null?id2.getText():null)).append("'::.ctor(").append((params51!=null?params51.tParams:null)).append(")\n");
                    			salida.append("\tstloc ").append(sc.getLocalPos()).append("\n");
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 15 :
                    // plp4.g:908:3: subref[0] PARI params[$PARI] PARD PYC
                    {
                    pushFollow(FOLLOW_subref_in_instr1037);
                    subref53=subref(0);

                    state._fsp--;

                    PARI52=(Token)match(input,PARI,FOLLOW_PARI_in_instr1040); 
                    pushFollow(FOLLOW_params_in_instr1042);
                    params54=params(PARI52);

                    state._fsp--;

                    match(input,PARD,FOLLOW_PARD_in_instr1045); 
                    match(input,PYC,FOLLOW_PYC_in_instr1047); 

                    			salida.append((subref53!=null?subref53.trad:null));
                    			Simbolo sp = (subref53!=null?subref53.sInicio:null);
                    			String name = (subref53!=null?subref53.text:null) + "[" + (params54!=null?params54.size:0) + "]";
                    			if ( funcionActual == null )
                    				salida.append("\tldloc ").append((subref53!=null?subref53.sInicio:null).getLocalPos()).append("\n");
                    			else
                    				salida.append("\n\tldarg 0");
                    			TablaSimbolos ts = null;
                    			if ( sp.getTipo() == null || sp.getTipo().getNombre().equals(tablaSimbolos.getCurrentClass().getNombre()) )
                    			{
                    				ts = tablaSimbolos;
                    			}
                    			else
                    			{
                    				ts = ((TipoClase)sp.getTipo()).getTablaSimbolos();
                    			}
                    			SimboloFuncion sf = (SimboloFuncion)ts.getSimbolo(name);
                    			if ( sf.isConstructor() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 34 (").append((subref53!=null?subref53.id:null).getLine()).append(",").append((subref53!=null?subref53.id:null).getCharPositionInLine()+1);
                    				sb.append("): constructor usado incorrectamente");
                    				LanzarError( sb.toString() );
                    			}
                    			salida.append((params54!=null?params54.trad:null));
                    			salida.append("\tcall instance ").append(sf.toWrite()).append(" '").append(sf.getClasePadre()).append("'::'").append(sf.getNombre()).append("'(").append(sf.getArgsAsString()).append(")\n");
                    			if ( sf.getTipo() != null )
                    				salida.append("\tpop\n");
                    			trad = salida.toString();
                    		

                    }
                    break;

            }
        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "instr"


    // $ANTLR start "bloquecatch"
    // plp4.g:941:1: bloquecatch[int etiqueta] returns [String trad] : CATCH PARI EXCEPTION ID PARD bloque[true,false] ;
    public final String bloquecatch(int etiqueta) throws RecognitionException {
        String trad = null;

        Token ID55=null;
        plp4Parser.bloque_return bloque56 = null;


        StringBuilder salida = new StringBuilder();
        try {
            // plp4.g:942:52: ( CATCH PARI EXCEPTION ID PARD bloque[true,false] )
            // plp4.g:943:2: CATCH PARI EXCEPTION ID PARD bloque[true,false]
            {
            match(input,CATCH,FOLLOW_CATCH_in_bloquecatch1069); 
            match(input,PARI,FOLLOW_PARI_in_bloquecatch1071); 
            match(input,EXCEPTION,FOLLOW_EXCEPTION_in_bloquecatch1073); 
            ID55=(Token)match(input,ID,FOLLOW_ID_in_bloquecatch1075); 
            match(input,PARD,FOLLOW_PARD_in_bloquecatch1077); 

            		SimboloExcepcion s = new SimboloExcepcion((ID55!=null?ID55.getText():null));
            		tablaSimbolos.addSimbolo(s);
            		pilaCatch.push(1);
            	
            pushFollow(FOLLOW_bloque_in_bloquecatch1083);
            bloque56=bloque(true, false);

            state._fsp--;


            		salida.append("\tcatch [mscorlib]System.Exception\n{\n");
            		salida.append((bloque56!=null?bloque56.trad:null));
            		salida.append("\tleave L").append(etiqueta).append("\n").append("}\n");
            		salida.append("\tL").append(etiqueta).append(":\n");
            		trad = salida.toString();
            		pilaCatch.pop();
            	

            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "bloquecatch"


    // $ANTLR start "dims"
    // plp4.g:959:1: dims[TipoArray t] returns [int dimensiones] : e1= ENTERO ( COMA e2= ENTERO )* ;
    public final int dims(TipoArray t) throws RecognitionException {
        int dimensiones = 0;

        Token e1=null;
        Token e2=null;
        Token COMA57=null;

        dimensiones = 0;
        try {
            // plp4.g:960:26: (e1= ENTERO ( COMA e2= ENTERO )* )
            // plp4.g:961:2: e1= ENTERO ( COMA e2= ENTERO )*
            {
            e1=(Token)match(input,ENTERO,FOLLOW_ENTERO_in_dims1108); 

            		TipoArray t2 = (TipoArray)t;
            		t2.setSize((e1!=null?e1.getText():null));
            		if ( t2.getSize() < 1 )
            		{
            			StringBuilder sb = new StringBuilder();
            			sb.append("Error 8 (").append(e1.getLine()).append(",").append(e1.getCharPositionInLine()+1);
            			sb.append("): tamanyo incorrecto");
            			LanzarError( sb.toString() );
            		}
            		dimensiones++;
            	
            // plp4.g:974:2: ( COMA e2= ENTERO )*
            loop18:
            do {
                int alt18=2;
                int LA18_0 = input.LA(1);

                if ( (LA18_0==COMA) ) {
                    alt18=1;
                }


                switch (alt18) {
            	case 1 :
            	    // plp4.g:975:3: COMA e2= ENTERO
            	    {
            	    COMA57=(Token)match(input,COMA,FOLLOW_COMA_in_dims1118); 
            	    e2=(Token)match(input,ENTERO,FOLLOW_ENTERO_in_dims1122); 

            	    			if ( t2.getTipoBase().isArray() )
            	    			{
            	    				t2 = (TipoArray)t2.getTipoBase();
            	    			}
            	    			dimensiones++;
            	    			if ( t.getDimensiones() < dimensiones)
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 10 (").append(COMA57.getLine()).append(",").append(COMA57.getCharPositionInLine()+1);
            	    				sb.append("): numero de dimensiones incorrecto");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			t2.setSize((e2!=null?e2.getText():null));
            	    			if ( t2.getSize() < 1 )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 8 (").append(e2.getLine()).append(",").append(e2.getCharPositionInLine()+1);
            	    				sb.append("): tamanyo incorrecto");
            	    				LanzarError( sb.toString() );
            	    			}
            	    		

            	    }
            	    break;

            	default :
            	    break loop18;
                }
            } while (true);


            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return dimensiones;
    }
    // $ANTLR end "dims"


    // $ANTLR start "cambio"
    // plp4.g:1000:1: cambio[Simbolo s, String ref, Simbolo sInicio, int cont] returns [ String trad ] : ( ASIG expr[s] PYC | PUNTO READLINE PYC );
    public final String cambio(Simbolo s, String ref, Simbolo sInicio, int cont) throws RecognitionException {
        String trad = null;

        Token ASIG58=null;
        Token READLINE60=null;
        plp4Parser.expr_return expr59 = null;


        StringBuilder salida = new StringBuilder(); trad = "";
        try {
            // plp4.g:1001:65: ( ASIG expr[s] PYC | PUNTO READLINE PYC )
            int alt19=2;
            int LA19_0 = input.LA(1);

            if ( (LA19_0==ASIG) ) {
                alt19=1;
            }
            else if ( (LA19_0==PUNTO) ) {
                alt19=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 19, 0, input);

                throw nvae;
            }
            switch (alt19) {
                case 1 :
                    // plp4.g:1002:3: ASIG expr[s] PYC
                    {
                    ASIG58=(Token)match(input,ASIG,FOLLOW_ASIG_in_cambio1150); 
                    pushFollow(FOLLOW_expr_in_cambio1152);
                    expr59=expr(s);

                    state._fsp--;

                    match(input,PYC,FOLLOW_PYC_in_cambio1155); 

                    			if ( s.isConstante() || ( s.isProperty() && !((SimboloProperty)s).hasSet() ) )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 15 (").append(ASIG58.getLine()).append(",").append(ASIG58.getCharPositionInLine()+1);
                    				sb.append("): la variable que se intenta modificar es de solo lectura");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( propertyActual != null && (expr59!=null?expr59.sr:null).getNombre().equals("valueAux") )
                    			{
                    				//if ( (expr59!=null?expr59.sr:null).getNombre().equals("valueAux"))
                    				//{
                    					salida.append("\tldarg 1\n");
                    					salida.append("\tst").append(ref);
                    				//}
                    			}
                    			else if ( !s.getTipo().isArray() )
                    			{
                    				if ( s.isObjeto() && !(expr59!=null?expr59.sr:null).getTipo().getNombre().equals(s.getTipo().getNombre() ) )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 6 (").append(ASIG58.getLine()).append(",").append(ASIG58.getCharPositionInLine()+1);
                    					sb.append("): tipos incompatibles en la instruccion de asignacion");
                    					LanzarError( sb.toString() );
                    				}
                    				if( ( s.isBooleano() && !(expr59!=null?expr59.sr:null).isBooleano() ) || ( !s.isBooleano() && (expr59!=null?expr59.sr:null).isBooleano() ) )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 6 (").append(ASIG58.getLine()).append(",").append(ASIG58.getCharPositionInLine()+1);
                    					sb.append("): tipos incompatibles en la instruccion de asignacion");
                    					LanzarError( sb.toString() );
                    				}
                    				if ( s.isCampo() && ( funcionActual != null || propertyActual != null ) )
                    					salida.append("\tldarg 0\n");
                    				salida.append((expr59!=null?expr59.trad:null));
                    				if ( s.isEntero() && (expr59!=null?expr59.sr:null).isReal() )
                    				{
                    					salida.append("\tconv.i\n");
                    				}
                    				else if ( s.isReal() && (expr59!=null?expr59.sr:null).isEntero() )
                    				{
                    					salida.append("\tconv.r8\n");
                    				}
                    				if ( !s.isProperty() )
                    					salida.append("\tst");
                    				salida.append(ref);
                    			}
                    			else
                    			{
                    				salida.append(ref);
                    				salida.append((expr59!=null?expr59.trad:null));
                    				if ( s.isEntero() && (expr59!=null?expr59.sr:null).isReal() )
                    				{
                    					salida.append("\tconv.i\n");
                    				}
                    				else if ( s.isReal() && (expr59!=null?expr59.sr:null).isEntero() )
                    				{
                    					salida.append("\tconv.r8\n");
                    				}
                    				if ( s.isReal() )
                    				{
                    					salida.append("\tstelem.r8\n");
                    				}
                    				else
                    				{
                    					salida.append("\tstelem.i4\n");
                    				}
                    			}
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:1074:3: PUNTO READLINE PYC
                    {
                    match(input,PUNTO,FOLLOW_PUNTO_in_cambio1166); 
                    READLINE60=(Token)match(input,READLINE,FOLLOW_READLINE_in_cambio1168); 
                    match(input,PYC,FOLLOW_PYC_in_cambio1170); 

                    			if ( s.isConstante() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 15 (").append(READLINE60.getLine()).append(",").append(READLINE60.getCharPositionInLine()+1);
                    				sb.append("): la variable que se intenta modificar es de solo lectura");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( s.isObjeto() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 32 (").append(READLINE60.getLine()).append(",").append(READLINE60.getCharPositionInLine()+1);
                    				sb.append("): la referencia es de tipo objeto");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( s.getTipo().isArray() )
                    			{
                    				salida.append(ref);
                    			}
                    			if ( funcionActual != null && s.isCampo() && !s.getTipo().isArray() )
                    				salida.append("\tldarg 0\n");
                    			salida.append("\tcall string [mscorlib]System.Console::ReadLine()\n");
                    			if ( s.isEntero() || s.getTipo().getTipoSimple().isEntero() )
                    			{
                    				if ( (READLINE60!=null?READLINE60.getText():null).charAt(0) != 'i' )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 7 (").append(READLINE60.getLine()).append(",").append(READLINE60.getCharPositionInLine()+1);
                    					sb.append("): tipos incompatibles en la instruccion de lectura");
                    					LanzarError( sb.toString() );
                    				}
                    				salida.append("\tcall int32[mscorlib]System.Int32::Parse(string)\n");
                    			}
                    			else if ( s.isBooleano() )
                    			{
                    				if ( (READLINE60!=null?READLINE60.getText():null).charAt(0) != 'b' )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 7 (").append(READLINE60.getLine()).append(",").append(READLINE60.getCharPositionInLine()+1);
                    					sb.append("): tipos incompatibles en la instruccion de lectura");
                    					LanzarError( sb.toString() );
                    				}
                    				salida.append("\tcall bool[mscorlib]System.Boolean::Parse(string)\n");
                    			}
                    			else
                    			{
                    				if ( (READLINE60!=null?READLINE60.getText():null).charAt(0) != 'd' )
                    				{
                    					StringBuilder sb = new StringBuilder();
                    					sb.append("Error 7 (").append(READLINE60.getLine()).append(",").append(READLINE60.getCharPositionInLine()+1);
                    					sb.append("): tipos incompatibles en la instruccion de lectura");
                    					LanzarError( sb.toString() );
                    				}
                    				salida.append("\tcall float64[mscorlib]System.Double::Parse(string)\n");
                    			}
                    			if ( !s.getTipo().isArray() )
                    			{
                    				if ( s.isCampo() )
                    				{
                    					SimboloCampo sc = (SimboloCampo)s;
                    					salida.append("\tstfld ").append(sc.toWrite()).append(" '").append(sc.getClasePadre()).append("'::'").append(sc.getNombre()).append("'\n");
                    				}
                    				else
                    					salida.append("\tstloc ").append(s.getLocalPos()).append("\n");
                    			}
                    			else
                    			{
                    				if ( s.isReal() )
                    				{
                    					salida.append("\tstelem.r8\n");
                    				}
                    				else
                    				{
                    					salida.append("\tstelem.i4\n");
                    				}
                    			}
                    			trad = salida.toString();
                    		

                    }
                    break;

            }
        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "cambio"

    public static class expr_return extends ParserRuleReturnScope {
        public String cima;
        public String trad;
        public Simbolo sr;
    };

    // $ANTLR start "expr"
    // plp4.g:1154:1: expr[Simbolo sh] returns [ String cima, String trad, Simbolo sr ] : e1= eand[sh] ( OR e2= eand[sh] )* ;
    public final plp4Parser.expr_return expr(Simbolo sh) throws RecognitionException {
        plp4Parser.expr_return retval = new plp4Parser.expr_return();
        retval.start = input.LT(1);

        Token OR61=null;
        plp4Parser.eand_return e1 = null;

        plp4Parser.eand_return e2 = null;


        StringBuilder salida = new StringBuilder(); retval.cima = ""; retval.trad = "";
        try {
            // plp4.g:1155:77: (e1= eand[sh] ( OR e2= eand[sh] )* )
            // plp4.g:1156:2: e1= eand[sh] ( OR e2= eand[sh] )*
            {
            pushFollow(FOLLOW_eand_in_expr1195);
            e1=eand(sh);

            state._fsp--;


            		retval.sr = (e1!=null?e1.sr:null);
            		retval.cima = (e1!=null?e1.cima:null);
            		salida.append((e1!=null?e1.trad:null));
            	
            // plp4.g:1162:2: ( OR e2= eand[sh] )*
            loop20:
            do {
                int alt20=2;
                int LA20_0 = input.LA(1);

                if ( (LA20_0==OR) ) {
                    alt20=1;
                }


                switch (alt20) {
            	case 1 :
            	    // plp4.g:1163:3: OR e2= eand[sh]
            	    {
            	    OR61=(Token)match(input,OR,FOLLOW_OR_in_expr1206); 
            	    pushFollow(FOLLOW_eand_in_expr1210);
            	    e2=eand(sh);

            	    state._fsp--;


            	    			if (  (e1!=null?e1.sr:null) != null && (e2!=null?e2.sr:null) != null && ( !(e2!=null?e2.sr:null).isBooleano() || !(e1!=null?e1.sr:null).isBooleano() ) )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 4 (").append(OR61.getLine()).append(",").append(OR61.getCharPositionInLine()+1).append("):");
            	    				sb.append(" tipo incompatible en operador logico '");
            	    				sb.append((OR61!=null?OR61.getText():null)).append("'");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			retval.sr = new SimboloBooleano("");
            	    			retval.cima = "bool";
            	    			salida.append((e2!=null?e2.trad:null));
            	    			salida.append("\tor\n");
            	    		

            	    }
            	    break;

            	default :
            	    break loop20;
                }
            } while (true);


            		if ( retval.cima.equals("") )
            		{
            			retval.cima = (e1!=null?e1.cima:null);
            		}
            		salida.append("\n");
            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "expr"

    public static class eand_return extends ParserRuleReturnScope {
        public String cima;
        public String trad;
        public Simbolo sr;
    };

    // $ANTLR start "eand"
    // plp4.g:1188:1: eand[Simbolo sh] returns [ String cima, String trad, Simbolo sr ] : e1= erel[sh] ( AND e2= erel[sh] )* ;
    public final plp4Parser.eand_return eand(Simbolo sh) throws RecognitionException {
        plp4Parser.eand_return retval = new plp4Parser.eand_return();
        retval.start = input.LT(1);

        plp4Parser.erel_return e1 = null;

        plp4Parser.erel_return e2 = null;


        StringBuilder salida = new StringBuilder(); retval.cima = ""; retval.trad = "";
        try {
            // plp4.g:1189:77: (e1= erel[sh] ( AND e2= erel[sh] )* )
            // plp4.g:1190:2: e1= erel[sh] ( AND e2= erel[sh] )*
            {
            pushFollow(FOLLOW_erel_in_eand1243);
            e1=erel(sh);

            state._fsp--;


            		salida.append((e1!=null?e1.trad:null));
            		retval.cima = (e1!=null?e1.cima:null);
            		retval.sr = (e1!=null?e1.sr:null);
            	
            // plp4.g:1196:2: ( AND e2= erel[sh] )*
            loop21:
            do {
                int alt21=2;
                int LA21_0 = input.LA(1);

                if ( (LA21_0==AND) ) {
                    alt21=1;
                }


                switch (alt21) {
            	case 1 :
            	    // plp4.g:1197:3: AND e2= erel[sh]
            	    {
            	    match(input,AND,FOLLOW_AND_in_eand1254); 
            	    pushFollow(FOLLOW_erel_in_eand1258);
            	    e2=erel(sh);

            	    state._fsp--;


            	    			retval.cima = "bool";
            	    			retval.sr = new SimboloBooleano("");
            	    			salida.append((e2!=null?e2.trad:null));
            	    			salida.append("\tand\n");
            	    		

            	    }
            	    break;

            	default :
            	    break loop21;
                }
            } while (true);


            		if ( retval.cima.equals("") )
            		{
            			retval.cima = (e1!=null?e1.cima:null);
            		}
            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "eand"

    public static class erel_return extends ParserRuleReturnScope {
        public String cima;
        public String trad;
        public Simbolo sr;
    };

    // $ANTLR start "erel"
    // plp4.g:1213:1: erel[Simbolo sh] returns [ String cima, String trad, Simbolo sr ] : e1= esum[sh] ( RELOP e2= esum[$e1.sr] )* ;
    public final plp4Parser.erel_return erel(Simbolo sh) throws RecognitionException {
        plp4Parser.erel_return retval = new plp4Parser.erel_return();
        retval.start = input.LT(1);

        Token RELOP62=null;
        plp4Parser.esum_return e1 = null;

        plp4Parser.esum_return e2 = null;


        StringBuilder salida = new StringBuilder(); retval.cima = ""; retval.trad = ""; Simbolo sant = null;
        try {
            // plp4.g:1214:98: (e1= esum[sh] ( RELOP e2= esum[$e1.sr] )* )
            // plp4.g:1215:2: e1= esum[sh] ( RELOP e2= esum[$e1.sr] )*
            {
            pushFollow(FOLLOW_esum_in_erel1291);
            e1=esum(sh);

            state._fsp--;


            		salida.append((e1!=null?e1.trad:null));
            		retval.sr = (e1!=null?e1.sr:null);
            		retval.cima = (e1!=null?e1.cima:null);
            		sant = (e1!=null?e1.sr:null);
            	
            // plp4.g:1222:2: ( RELOP e2= esum[$e1.sr] )*
            loop22:
            do {
                int alt22=2;
                int LA22_0 = input.LA(1);

                if ( (LA22_0==RELOP) ) {
                    alt22=1;
                }


                switch (alt22) {
            	case 1 :
            	    // plp4.g:1223:3: RELOP e2= esum[$e1.sr]
            	    {
            	    RELOP62=(Token)match(input,RELOP,FOLLOW_RELOP_in_erel1302); 
            	    pushFollow(FOLLOW_esum_in_erel1306);
            	    e2=esum((e1!=null?e1.sr:null));

            	    state._fsp--;


            	    			retval.cima = "bool";
            	    			retval.sr = new SimboloBooleano("");
            	    			if ( sant.isObjeto() && !(e2!=null?e2.sr:null).getTipo().getNombre().equals(sant.getTipo().getNombre() ) )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 33 (").append(RELOP62.getLine()).append(",").append(RELOP62.getCharPositionInLine()+1);
            	    				sb.append("): tipo incompatible en operador relacional '").append((RELOP62!=null?RELOP62.getText():null)).append("'");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			if ( (e2!=null?e2.sr:null).isObjeto() && !sant.getTipo().getNombre().equals((e2!=null?e2.sr:null).getTipo().getNombre() ) )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 33 (").append(RELOP62.getLine()).append(",").append(RELOP62.getCharPositionInLine()+1);
            	    				sb.append("): tipo incompatible en operador relacional '").append((RELOP62!=null?RELOP62.getText():null)).append("'");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			if (  sant != null && (e2!=null?e2.sr:null) != null && (e2!=null?e2.sr:null).isReal())
            	    			{
            	    				salida.append("\tconv.r8\n");
            	    			}
            	    			salida.append((e2!=null?e2.trad:null));
            	    			if ( sant != null && (e2!=null?e2.sr:null) != null && sant.isReal())
            	    			{
            	    				salida.append("\tconv.r8\n");
            	    			}
            	    			salida.append(traductor.get((RELOP62!=null?RELOP62.getText():null))).append("\n");
            	    			sant = retval.sr;
            	    		

            	    }
            	    break;

            	default :
            	    break loop22;
                }
            } while (true);


            		if ( retval.cima.equals("") )
            		{
            			retval.cima = (e1!=null?e1.cima:null);
            		}
            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "erel"

    public static class esum_return extends ParserRuleReturnScope {
        public String cima;
        public String trad;
        public Simbolo sr;
    };

    // $ANTLR start "esum"
    // plp4.g:1262:1: esum[Simbolo sh] returns [ String cima, String trad, Simbolo sr ] : t1= term[sh] ( ADDOP t2= term[$sr] )* ;
    public final plp4Parser.esum_return esum(Simbolo sh) throws RecognitionException {
        plp4Parser.esum_return retval = new plp4Parser.esum_return();
        retval.start = input.LT(1);

        Token ADDOP63=null;
        plp4Parser.term_return t1 = null;

        plp4Parser.term_return t2 = null;


        StringBuilder salida = new StringBuilder(); retval.cima = ""; retval.trad = ""; retval.sr = null;
        try {
            // plp4.g:1263:89: (t1= term[sh] ( ADDOP t2= term[$sr] )* )
            // plp4.g:1264:2: t1= term[sh] ( ADDOP t2= term[$sr] )*
            {
            pushFollow(FOLLOW_term_in_esum1339);
            t1=term(sh);

            state._fsp--;


            		salida.append((t1!=null?t1.trad:null));
            		retval.cima = (t1!=null?t1.cima:null);
            		retval.sr = (t1!=null?t1.sr:null);
            	
            // plp4.g:1270:2: ( ADDOP t2= term[$sr] )*
            loop23:
            do {
                int alt23=2;
                int LA23_0 = input.LA(1);

                if ( (LA23_0==ADDOP) ) {
                    alt23=1;
                }


                switch (alt23) {
            	case 1 :
            	    // plp4.g:1271:3: ADDOP t2= term[$sr]
            	    {
            	    ADDOP63=(Token)match(input,ADDOP,FOLLOW_ADDOP_in_esum1350); 
            	    pushFollow(FOLLOW_term_in_esum1354);
            	    t2=term(retval.sr);

            	    state._fsp--;


            	    			if (  (t1!=null?t1.sr:null) != null && (t2!=null?t2.sr:null) != null && ( (t2!=null?t2.sr:null).isBooleano() || (t1!=null?t1.sr:null).isBooleano() ) )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 3 (").append(ADDOP63.getLine()).append(",").append(ADDOP63.getCharPositionInLine()+1).append("):");
            	    				sb.append(" tipo incompatible en operador aritmetico '");
            	    				sb.append((ADDOP63!=null?ADDOP63.getText():null)).append("'");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			retval.cima = "int32";
            	    			if (  (t1!=null?t1.sr:null) != null && (t2!=null?t2.sr:null) != null && (t2!=null?t2.sr:null).isReal())
            	    			{
            	    				salida.append("\tconv.r8\n");
            	    				retval.sr = (t2!=null?t2.sr:null);
            	    			}
            	    			salida.append((t2!=null?t2.trad:null));
            	    			if ( (t1!=null?t1.sr:null) != null && (t2!=null?t2.sr:null) != null && (t1!=null?t1.sr:null).isReal())
            	    			{
            	    				salida.append("\tconv.r8\n");
            	    			}
            	    			salida.append(traductor.get((ADDOP63!=null?ADDOP63.getText():null))).append("\n");
            	    		

            	    }
            	    break;

            	default :
            	    break loop23;
                }
            } while (true);


            		if ( retval.cima.equals("") )
            		{
            			retval.cima = (t1!=null?t1.cima:null);
            		}
            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "esum"

    public static class term_return extends ParserRuleReturnScope {
        public String cima;
        public String trad;
        public Simbolo sr;
    };

    // $ANTLR start "term"
    // plp4.g:1303:1: term[Simbolo sh] returns [ String cima, String trad, Simbolo sr ] : f1= factor[sh, \"\"] ( MULOP f2= factor[sh, \"mul\"] )* ;
    public final plp4Parser.term_return term(Simbolo sh) throws RecognitionException {
        plp4Parser.term_return retval = new plp4Parser.term_return();
        retval.start = input.LT(1);

        Token MULOP64=null;
        plp4Parser.factor_return f1 = null;

        plp4Parser.factor_return f2 = null;


        StringBuilder salida = new StringBuilder(); retval.cima = ""; retval.trad = "";
        try {
            // plp4.g:1304:77: (f1= factor[sh, \"\"] ( MULOP f2= factor[sh, \"mul\"] )* )
            // plp4.g:1305:2: f1= factor[sh, \"\"] ( MULOP f2= factor[sh, \"mul\"] )*
            {
            pushFollow(FOLLOW_factor_in_term1387);
            f1=factor(sh, "");

            state._fsp--;


            		salida.append((f1!=null?f1.trad:null));
            		retval.cima = (f1!=null?f1.cima:null);
            		retval.sr = (f1!=null?f1.sr:null);
            	
            // plp4.g:1311:2: ( MULOP f2= factor[sh, \"mul\"] )*
            loop24:
            do {
                int alt24=2;
                int LA24_0 = input.LA(1);

                if ( (LA24_0==MULOP) ) {
                    alt24=1;
                }


                switch (alt24) {
            	case 1 :
            	    // plp4.g:1312:3: MULOP f2= factor[sh, \"mul\"]
            	    {
            	    MULOP64=(Token)match(input,MULOP,FOLLOW_MULOP_in_term1398); 
            	    pushFollow(FOLLOW_factor_in_term1402);
            	    f2=factor(sh, "mul");

            	    state._fsp--;


            	    			if (  (f1!=null?f1.sr:null) != null && (f2!=null?f2.sr:null) != null && ( (f2!=null?f2.sr:null).isBooleano() || (f1!=null?f1.sr:null).isBooleano() ) )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 3 (").append(MULOP64.getLine()).append(",").append(MULOP64.getCharPositionInLine()+1).append("):");
            	    				sb.append(" tipo incompatible en operador aritmetico '");
            	    				sb.append((MULOP64!=null?MULOP64.getText():null)).append("'");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			retval.cima = "int32";
            	    			if (  (f1!=null?f1.sr:null) != null && (f2!=null?f2.sr:null) != null && (f2!=null?f2.sr:null).isReal())
            	    			{
            	    				salida.append("\tconv.r8\n");
            	    				retval.sr = (f2!=null?f2.sr:null);
            	    			}
            	    			salida.append((f2!=null?f2.trad:null));
            	    			if ( (f1!=null?f1.sr:null) != null && (f2!=null?f2.sr:null) != null && (f1!=null?f1.sr:null).isReal())
            	    			{
            	    				salida.append("\tconv.r8\n");
            	    			}
            	    			salida.append(traductor.get((MULOP64!=null?MULOP64.getText():null))).append("\n");
            	    		

            	    }
            	    break;

            	default :
            	    break loop24;
                }
            } while (true);


            		if ( retval.cima.equals("") )
            		{
            			retval.cima = (f1!=null?f1.cima:null);
            		}
            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "term"

    public static class factor_return extends ParserRuleReturnScope {
        public String cima;
        public String trad;
        public Simbolo sr;
    };

    // $ANTLR start "factor"
    // plp4.g:1344:1: factor[Simbolo sh, String op] returns [ String cima, String trad, Simbolo sr ] : ( base[sh, op] | NOT f1= factor[sh, op] | PARI ADDOP f2= factor[sh, op] PARD );
    public final plp4Parser.factor_return factor(Simbolo sh, String op) throws RecognitionException {
        plp4Parser.factor_return retval = new plp4Parser.factor_return();
        retval.start = input.LT(1);

        Token NOT66=null;
        Token ADDOP67=null;
        plp4Parser.factor_return f1 = null;

        plp4Parser.factor_return f2 = null;

        plp4Parser.base_return base65 = null;


        StringBuilder salida = new StringBuilder(); retval.cima = ""; retval.trad = "";
        try {
            // plp4.g:1345:77: ( base[sh, op] | NOT f1= factor[sh, op] | PARI ADDOP f2= factor[sh, op] PARD )
            int alt25=3;
            switch ( input.LA(1) ) {
            case ID:
            case ENTERO:
            case REAL:
            case BOOLEANO:
                {
                alt25=1;
                }
                break;
            case PARI:
                {
                int LA25_2 = input.LA(2);

                if ( (LA25_2==ADDOP) ) {
                    alt25=3;
                }
                else if ( (LA25_2==ID||LA25_2==PARI||(LA25_2>=ENTERO && LA25_2<=BOOLEANO)||LA25_2==NOT) ) {
                    alt25=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 25, 2, input);

                    throw nvae;
                }
                }
                break;
            case NOT:
                {
                alt25=2;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 25, 0, input);

                throw nvae;
            }

            switch (alt25) {
                case 1 :
                    // plp4.g:1346:2: base[sh, op]
                    {
                    pushFollow(FOLLOW_base_in_factor1433);
                    base65=base(sh, op);

                    state._fsp--;


                    		retval.trad = (base65!=null?base65.trad:null);
                    		retval.cima = (base65!=null?base65.cima:null);
                    		retval.sr = (base65!=null?base65.sr:null);
                    	

                    }
                    break;
                case 2 :
                    // plp4.g:1353:3: NOT f1= factor[sh, op]
                    {
                    NOT66=(Token)match(input,NOT,FOLLOW_NOT_in_factor1444); 
                    pushFollow(FOLLOW_factor_in_factor1448);
                    f1=factor(sh, op);

                    state._fsp--;


                    		if (  (f1!=null?f1.sr:null) != null && !(f1!=null?f1.sr:null).isBooleano() )
                    		{
                    			StringBuilder sb = new StringBuilder();
                    			sb.append("Error 4 (").append(NOT66.getLine()).append(",").append(NOT66.getCharPositionInLine()+1).append("):");
                    			sb.append(" tipo incompatible en operador logico '");
                    			sb.append((NOT66!=null?NOT66.getText():null)).append("'");
                    			LanzarError( sb.toString() );
                    		}
                    		salida.append((f1!=null?f1.trad:null));
                    		salida.append("\tldc.i4.1\n");
                    		salida.append("\txor\n");
                    		retval.trad = salida.toString();
                    		retval.cima = (f1!=null?f1.cima:null);
                    		retval.sr = f1.sr;
                    	

                    }
                    break;
                case 3 :
                    // plp4.g:1371:3: PARI ADDOP f2= factor[sh, op] PARD
                    {
                    match(input,PARI,FOLLOW_PARI_in_factor1459); 
                    ADDOP67=(Token)match(input,ADDOP,FOLLOW_ADDOP_in_factor1461); 
                    pushFollow(FOLLOW_factor_in_factor1465);
                    f2=factor(sh, op);

                    state._fsp--;

                    match(input,PARD,FOLLOW_PARD_in_factor1468); 

                    			salida.append((f2!=null?f2.trad:null));
                    			if ( (ADDOP67!=null?ADDOP67.getText():null).equals("-"))
                    			{
                    				salida.append("\tneg\n");
                    			}
                    			retval.trad = salida.toString();
                    			retval.cima = (f2!=null?f2.cima:null);
                    			retval.sr = f2.sr;
                    		

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "factor"

    public static class base_return extends ParserRuleReturnScope {
        public String cima;
        public String trad;
        public Simbolo sr;
    };

    // $ANTLR start "base"
    // plp4.g:1384:1: base[Simbolo sh, String op] returns [ String cima, String trad, Simbolo sr ] : ( ( ENTERO | REAL | BOOLEANO ) | PARI expr[sh] PARD | ref[op] | subref[1] PARI params[$PARI] PARD );
    public final plp4Parser.base_return base(Simbolo sh, String op) throws RecognitionException {
        plp4Parser.base_return retval = new plp4Parser.base_return();
        retval.start = input.LT(1);

        Token ENTERO68=null;
        Token REAL69=null;
        Token BOOLEANO70=null;
        Token PARI73=null;
        plp4Parser.expr_return expr71 = null;

        plp4Parser.ref_return ref72 = null;

        plp4Parser.subref_return subref74 = null;

        plp4Parser.params_return params75 = null;


        StringBuilder salida = new StringBuilder(); retval.cima = ""; retval.trad = ""; retval.sr = null;
        try {
            // plp4.g:1385:89: ( ( ENTERO | REAL | BOOLEANO ) | PARI expr[sh] PARD | ref[op] | subref[1] PARI params[$PARI] PARD )
            int alt27=4;
            alt27 = dfa27.predict(input);
            switch (alt27) {
                case 1 :
                    // plp4.g:1386:2: ( ENTERO | REAL | BOOLEANO )
                    {
                    // plp4.g:1386:2: ( ENTERO | REAL | BOOLEANO )
                    int alt26=3;
                    switch ( input.LA(1) ) {
                    case ENTERO:
                        {
                        alt26=1;
                        }
                        break;
                    case REAL:
                        {
                        alt26=2;
                        }
                        break;
                    case BOOLEANO:
                        {
                        alt26=3;
                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("", 26, 0, input);

                        throw nvae;
                    }

                    switch (alt26) {
                        case 1 :
                            // plp4.g:1387:4: ENTERO
                            {
                            ENTERO68=(Token)match(input,ENTERO,FOLLOW_ENTERO_in_base1498); 

                            				if ( sh != null && sh.isReal() )
                            				{
                            					salida.append("\tldc.r8 ").append((ENTERO68!=null?ENTERO68.getText():null)).append("\n");
                            				}
                            				else
                            				{
                            					salida.append("\tldc.i4 ").append((ENTERO68!=null?ENTERO68.getText():null)).append("\n");
                            				}
                            				retval.sr = new SimboloEntero("simbolo");
                            				retval.trad = salida.toString();
                            				retval.cima = "int32";
                            			

                            }
                            break;
                        case 2 :
                            // plp4.g:1402:4: REAL
                            {
                            REAL69=(Token)match(input,REAL,FOLLOW_REAL_in_base1512); 

                            				salida.append("\tldc.r8 ").append((REAL69!=null?REAL69.getText():null)).append("\n");
                            				retval.trad = salida.toString();
                            				retval.sr = new SimboloReal("simbolo");
                            				retval.cima = "float64";
                            			

                            }
                            break;
                        case 3 :
                            // plp4.g:1410:4: BOOLEANO
                            {
                            BOOLEANO70=(Token)match(input,BOOLEANO,FOLLOW_BOOLEANO_in_base1526); 

                            				salida.append("\tldc.i4 ");
                            				if ( (BOOLEANO70!=null?BOOLEANO70.getText():null).equals("True"))
                            					salida.append("1\n");
                            				else
                            					salida.append("0\n");
                            				retval.trad = salida.toString();
                            				retval.sr = new SimboloBooleano("simbolo");
                            				retval.cima = "bool";
                            			

                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // plp4.g:1423:3: PARI expr[sh] PARD
                    {
                    match(input,PARI,FOLLOW_PARI_in_base1541); 
                    pushFollow(FOLLOW_expr_in_base1543);
                    expr71=expr(sh);

                    state._fsp--;

                    match(input,PARD,FOLLOW_PARD_in_base1546); 

                    			retval.trad = (expr71!=null?expr71.trad:null);
                    			retval.cima = (expr71!=null?expr71.cima:null);
                    			retval.sr = (expr71!=null?expr71.sr:null);
                    		

                    }
                    break;
                case 3 :
                    // plp4.g:1430:3: ref[op]
                    {
                    pushFollow(FOLLOW_ref_in_base1558);
                    ref72=ref(op);

                    state._fsp--;


                    			if ( propertyActual == null || !(ref72!=null?ref72.s:null).getNombre().equals("valueAux") )
                    			{
                    				if ( !(ref72!=null?ref72.s:null).getTipo().isArray()  && !(ref72!=null?ref72.s:null).isProperty() )
                    				{
                    					if ( (ref72!=null?ref72.s:null).isCampo() && !(ref72!=null?ref72.s:null).isConstante() )
                    						salida.append("\n\tldarg 0\n");
                    					salida.append("\tld").append((ref72!=null?ref72.trad:null));
                    				}
                    				else
                    				{
                    					salida.append((ref72!=null?ref72.trad:null));
                    					if ( !(ref72!=null?ref72.s:null).isProperty() )
                    					{
                    						if ( (ref72!=null?ref72.s:null).isReal() )
                    						{
                    							salida.append("\tldelem.r8\n");
                    						}
                    						else
                    						{
                    							salida.append("\tldelem.i4\n");
                    						}
                    					}
                    				}
                    			}
                    			else if ( (ref72!=null?ref72.s:null).isProperty() && (ref72!=null?ref72.s:null).getNombre().equals("valueAux") )
                    			{
                    				salida.append((ref72!=null?ref72.trad:null));
                    			}
                    			retval.trad = salida.toString();
                    			retval.cima = (ref72!=null?ref72.cima:null);
                    			retval.sr = (ref72!=null?ref72.s:null);
                    		

                    }
                    break;
                case 4 :
                    // plp4.g:1465:3: subref[1] PARI params[$PARI] PARD
                    {
                    pushFollow(FOLLOW_subref_in_base1570);
                    subref74=subref(1);

                    state._fsp--;

                    PARI73=(Token)match(input,PARI,FOLLOW_PARI_in_base1573); 
                    pushFollow(FOLLOW_params_in_base1575);
                    params75=params(PARI73);

                    state._fsp--;

                    match(input,PARD,FOLLOW_PARD_in_base1578); 

                    			salida.append((subref74!=null?subref74.trad:null));
                    			String name = (subref74!=null?subref74.text:null) + "[" + (params75!=null?params75.size:0) + "]";
                    			Simbolo sp = (subref74!=null?subref74.sInicio:null);
                    			TablaSimbolos ts = null;
                    			if ( sp.getTipo() == null || sp.getTipo().getNombre().equals(tablaSimbolos.getCurrentClass().getNombre()) )
                    			{
                    				ts = tablaSimbolos;
                    			}
                    			else
                    			{
                    				ts = ((TipoClase)sp.getTipo()).getTablaSimbolos();
                    			}
                    			if ( ts.getSimbolo(name) == null )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 25 (").append((subref74!=null?subref74.id:null).getLine()).append(",").append((subref74!=null?subref74.id:null).getCharPositionInLine()+1).append("): el metodo '");
                    				sb.append(tablaSimbolos.getCurrentClass().getNombre()).append(".").append((subref74!=null?subref74.text:null)).append("(");
                    				sb.append((params75!=null?params75.tError:null)).append(")' no esta definido");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( funcionActual == null )
                    				salida.append("\n\tldloc ").append((subref74!=null?subref74.sInicio:null).getLocalPos()).append("\n");
                    			else
                    				salida.append("\n\tldarg 0\n");
                    			SimboloFuncion sf = (SimboloFuncion)ts.getSimbolo(name);
                    			if ( sf.isConstructor() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 34 (").append((subref74!=null?subref74.id:null).getLine()).append(",").append((subref74!=null?subref74.id:null).getCharPositionInLine()+1);
                    				sb.append("): constructor usado incorrectamente");
                    				LanzarError( sb.toString() );
                    			}
                    			retval.cima = sf.toWrite();
                    			salida.append((params75!=null?params75.trad:null));
                    			salida.append("\tcall instance ").append(retval.cima).append(" '").append(sf.getClasePadre()).append("'::'").append(sf.getNombre()).append("'(").append(sf.getArgsAsString()).append(")\n");
                    			retval.trad = salida.toString();
                    			retval.sr = sf;
                    		

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "base"

    public static class ref_return extends ParserRuleReturnScope {
        public String trad;
        public String cima;
        public Simbolo s;
        public int fila;
        public int columna;
        public Simbolo sInicio;
        public int cont;
        public Token id;
    };

    // $ANTLR start "ref"
    // plp4.g:1506:1: ref[String op] returns [ String trad, String cima, Simbolo s, int fila, int columna, Simbolo sInicio, int cont, Token id ] : subref[-1] ( CORI indices[$s, op] CORD )? ;
    public final plp4Parser.ref_return ref(String op) throws RecognitionException {
        plp4Parser.ref_return retval = new plp4Parser.ref_return();
        retval.start = input.LT(1);

        plp4Parser.subref_return subref76 = null;

        plp4Parser.indices_return indices77 = null;


        StringBuilder salida = new StringBuilder(); retval.trad = ""; retval.cima = "";
        try {
            // plp4.g:1507:77: ( subref[-1] ( CORI indices[$s, op] CORD )? )
            // plp4.g:1508:2: subref[-1] ( CORI indices[$s, op] CORD )?
            {
            pushFollow(FOLLOW_subref_in_ref1601);
            subref76=subref(-1);

            state._fsp--;


            		retval.s = (subref76!=null?subref76.simbolo:null);
            		retval.id = (subref76!=null?subref76.id:null);
            		retval.cont = (subref76!=null?subref76.cont:0);
            		retval.sInicio = (subref76!=null?subref76.sInicio:null);
            		retval.cima = (subref76!=null?subref76.cima:null);
            		Token id = (subref76!=null?subref76.id:null);
            		if ( retval.s == null )
            		{
            			StringBuilder sb = new StringBuilder();
            			sb.append("Error 2 (").append(id.getLine()).append(",").append(id.getCharPositionInLine()+1).append("): simbolo '");
            			sb.append((subref76!=null?subref76.text:null)).append("' no ha sido declarado");
            			LanzarError( sb.toString() );
            		}
            		if ( retval.s.isProperty()  && !retval.s.getNombre().equals("valueAux") )
            		{
            			if ( op.equals("cambio"))
            			{
            				salida.append("\n\tcall instance void '").append(((SimboloProperty)retval.s).getClasePadre()).append("'::'set_").append(retval.s.getNombre()).append("'(").append(retval.s.toWrite()).append(")\n");
            			}
            			else
            			{
            				if ( funcionActual == null )
            					salida.append("\tldloc ").append((subref76!=null?subref76.sInicio:null).getLocalPos()).append("\n");
            				else
            					salida.append("\tldarg 0\n");
            				salida.append("\tcall instance ").append(retval.s.toWrite()).append(" '").append(((SimboloProperty)retval.s).getClasePadre()).append("'::'get_").append(retval.s.getNombre()).append("'()\n");				
            			}
            		}
            		else if ( propertyActual == null && !retval.s.getTipo().isArray() )
            		{
            			if ( funcionActual != null )
            			{
            				salida.append((subref76!=null?subref76.trad:null)).append("\n");
            			//	salida.append((subref76!=null?subref76.trad:null));
            				retval.cima = retval.s.toWrite();
            			}
            			else if ( !retval.s.getTipo().isArray() )
            			{
            				//salida.append("loc ").append( (subref76!=null?subref76.sInicio:null).getLocalPos() ).append("\n");
            				salida.append((subref76!=null?subref76.trad:null));
            				retval.cima = retval.s.toWrite();
            			}
            			else
            			{
            				retval.cima = retval.s.getTipo().getTipoBase().toWrite();
            			}
            		}
            		else
            		{
            			if ( retval.s.isCampo() && !retval.s.getTipo().isArray() )
            			{
            				if ( retval.s.isConstante() )
            					salida.append("s");
            				salida.append("fld ").append(retval.s.getTipo().toWrite()).append(" '").append(((SimboloCampo)retval.s).getClasePadre()).append("'::'").append((subref76!=null?subref76.text:null)).append("'\n");
            			}
            			else if ( retval.s.getNombre().equals("valueAux") )
            			{
            				salida.append("\tldarg 1\n");
            			}
            		}
            	
            // plp4.g:1571:2: ( CORI indices[$s, op] CORD )?
            int alt28=2;
            int LA28_0 = input.LA(1);

            if ( (LA28_0==CORI) ) {
                alt28=1;
            }
            switch (alt28) {
                case 1 :
                    // plp4.g:1572:3: CORI indices[$s, op] CORD
                    {
                    match(input,CORI,FOLLOW_CORI_in_ref1612); 

                    			if ( !retval.s.getTipo().isArray() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 11 (").append((subref76!=null?subref76.id:null).getLine()).append(",").append((subref76!=null?subref76.id:null).getCharPositionInLine()+1);
                    				sb.append("): el identificador '").append((subref76!=null?subref76.text:null)).append("' no es de tipo array");
                    				LanzarError( sb.toString() );
                    			}
                    		
                    pushFollow(FOLLOW_indices_in_ref1620);
                    indices77=indices(retval.s, op);

                    state._fsp--;

                    match(input,CORD,FOLLOW_CORD_in_ref1623); 

                    			TipoArray tArr = (TipoArray)retval.s.getTipo();
                    			if ( (indices77!=null?indices77.indice:0) < ( tArr.getDimensiones() + 1 ))
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 9 (").append((subref76!=null?subref76.id:null).getLine()).append(",").append((subref76!=null?subref76.id:null).getCharPositionInLine()+1);
                    				sb.append("): numero insuficiente de indices en el array '");
                    				sb.append((subref76!=null?subref76.text:null));
                    				sb.append("'");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( retval.s.isCampo() )
                    			{
                    				if ( funcionActual != null )
                    				{
                    					salida.append("\tldarg 0\n\tldfld ").append(retval.s.toWrite()).append(" '").append(((SimboloCampo)retval.s).getClasePadre()).append("'::'");
                    					salida.append(retval.s.getNombre()).append("'\n");
                    				}
                    				else
                    				{
                    					salida.append("\tldloc ").append((subref76!=null?subref76.sInicio:null).getLocalPos()).append("\n");
                    					salida.append("\tld");
                    					if ( retval.s.isConstante() )
                    						salida.append("s");
                    					salida.append("fld ").append(retval.s.toWrite()).append(" '").append(((SimboloCampo)retval.s).getClasePadre()).append("'::'");
                    					salida.append(retval.s.getNombre()).append("'\n");
                    				}
                    			}
                    			else
                    				salida.append("\tldloc ").append(retval.s.getLocalPos()).append("\n");
                    			salida.append( (indices77!=null?indices77.trad:null) );	
                    			if ( !retval.s.getTipo().isArray() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 11 (").append((subref76!=null?subref76.id:null).getLine()).append(",").append((subref76!=null?subref76.id:null).getCharPositionInLine()+1);
                    				sb.append("): el identificador '");
                    				sb.append((subref76!=null?subref76.text:null));
                    				sb.append("' no es de tipo array");
                    				LanzarError( sb.toString() );
                    			}
                    			if ( tArr.getTipoSimple().isReal() )
                    				retval.cima = "float64";
                    			else if (tArr.getTipoSimple().isEntero() )
                    				retval.cima = "int32";
                    			else
                    				retval.cima = "bool";
                    				
                    		

                    }
                    break;

            }


            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "ref"

    public static class indices_return extends ParserRuleReturnScope {
        public String trad;
        public int indice;
    };

    // $ANTLR start "indices"
    // plp4.g:1636:1: indices[Simbolo s, String op] returns [String trad, int indice] : e1= expr[new SimboloEntero(\"\")] ( COMA e2= expr[s] )* ;
    public final plp4Parser.indices_return indices(Simbolo s, String op) throws RecognitionException {
        plp4Parser.indices_return retval = new plp4Parser.indices_return();
        retval.start = input.LT(1);

        Token COMA78=null;
        plp4Parser.expr_return e1 = null;

        plp4Parser.expr_return e2 = null;


        StringBuilder salida = new StringBuilder(); retval.indice = 1; retval.trad = "";
        try {
            // plp4.g:1637:76: (e1= expr[new SimboloEntero(\"\")] ( COMA e2= expr[s] )* )
            // plp4.g:1638:2: e1= expr[new SimboloEntero(\"\")] ( COMA e2= expr[s] )*
            {
            pushFollow(FOLLOW_expr_in_indices1652);
            e1=expr(new SimboloEntero(""));

            state._fsp--;


            		TipoArray t = (TipoArray)s.getTipo();
            		if ( t != null && t.isInicializado() )
            		{
            			salida.append("//Inicio acceso a vector\n\tldc.i4.0 \n");
            			salida.append((e1!=null?e1.trad:null));
            			salida.append("\tconv.i\n");
            			if ( t != null )
            				salida.append("\tldc.i4 ").append(t.getParcialSize(retval.indice)).append("\n");
            			else
            				salida.append("\tldc.i4 0\n");
            			salida.append("\tmul\n");
            			salida.append("\tadd\n");
            		}
            		retval.indice++;
            	
            // plp4.g:1655:2: ( COMA e2= expr[s] )*
            loop29:
            do {
                int alt29=2;
                int LA29_0 = input.LA(1);

                if ( (LA29_0==COMA) ) {
                    alt29=1;
                }


                switch (alt29) {
            	case 1 :
            	    // plp4.g:1656:3: COMA e2= expr[s]
            	    {
            	    COMA78=(Token)match(input,COMA,FOLLOW_COMA_in_indices1663); 
            	    pushFollow(FOLLOW_expr_in_indices1667);
            	    e2=expr(s);

            	    state._fsp--;


            	    			if ( t != null && t.isInicializado() && !(op.equals("mul") &&  s.isBooleano() ) )
            	    			{
            	    				if ( (e2!=null?e2.sr:null).isBooleano() )
            	    				{
            	    					StringBuilder sb = new StringBuilder();
            	    					sb.append("Error 13 (").append(COMA78.getLine()).append(",").append(COMA78.getCharPositionInLine()+1);
            	    					sb.append("): indice de tipo incompatible");
            	    					LanzarError( sb.toString() );
            	    				}
            	    				if ( t != null && retval.indice < t.getDimensiones() )
            	    				{
            	    					salida.append((e2!=null?e2.trad:null));
            	    					salida.append("\tconv.i\n");
            	    					salida.append("\tldc.i4 ").append(t.getParcialSize(retval.indice)).append("\n");
            	    					salida.append("\tmul\n");
            	    					salida.append("\tadd\n");
            	    				}
            	    				else if ( t != null && retval.indice == t.getDimensiones() )
            	    				{
            	    					salida.append((e2!=null?e2.trad:null));
            	    					salida.append("\tconv.i\n");
            	    					salida.append("\tadd\n");
            	    				}
            	    				else
            	    				{
            	    					StringBuilder sb = new StringBuilder();
            	    					sb.append("Error 12 (").append(COMA78.getLine()).append(",").append(COMA78.getCharPositionInLine()+1);
            	    					sb.append("): demasiados indices");
            	    					LanzarError( sb.toString() );
            	    				}
            	    			}
            	    			retval.indice++;
            	    		

            	    }
            	    break;

            	default :
            	    break loop29;
                }
            } while (true);


            		salida.append("//FIN ACCESO VECTOR\n");
            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "indices"


    // $ANTLR start "miembro"
    // plp4.g:1697:1: miembro returns [String trad] : ( campo | metodo | propiedad );
    public final String miembro() throws RecognitionException {
        String trad = null;

        String campo79 = null;

        String metodo80 = null;

        String propiedad81 = null;


        StringBuilder salida = new StringBuilder(); trad = "";
        try {
            // plp4.g:1698:63: ( campo | metodo | propiedad )
            int alt30=3;
            alt30 = dfa30.predict(input);
            switch (alt30) {
                case 1 :
                    // plp4.g:1699:3: campo
                    {
                    pushFollow(FOLLOW_campo_in_miembro1695);
                    campo79=campo();

                    state._fsp--;


                    			trad = campo79;
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:1704:3: metodo
                    {
                    pushFollow(FOLLOW_metodo_in_miembro1706);
                    metodo80=metodo();

                    state._fsp--;


                    			trad = metodo80;
                    		

                    }
                    break;
                case 3 :
                    // plp4.g:1709:3: propiedad
                    {
                    pushFollow(FOLLOW_propiedad_in_miembro1717);
                    propiedad81=propiedad();

                    state._fsp--;


                    			trad = propiedad81;
                    		

                    }
                    break;

            }
        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "miembro"


    // $ANTLR start "campo"
    // plp4.g:1714:1: campo returns [String trad] : visibilidad decl[$visibilidad.visibilidad] ;
    public final String campo() throws RecognitionException {
        String trad = null;

        plp4Parser.visibilidad_return visibilidad82 = null;

        plp4Parser.decl_return decl83 = null;


        StringBuilder salida = new StringBuilder(); trad = "";
        try {
            // plp4.g:1715:63: ( visibilidad decl[$visibilidad.visibilidad] )
            // plp4.g:1716:2: visibilidad decl[$visibilidad.visibilidad]
            {
            pushFollow(FOLLOW_visibilidad_in_campo1736);
            visibilidad82=visibilidad();

            state._fsp--;


            		isCampo = true;
            	
            pushFollow(FOLLOW_decl_in_campo1742);
            decl83=decl((visibilidad82!=null?visibilidad82.visibilidad:false));

            state._fsp--;


            		isCampo = false;
            		trad = (decl83!=null?decl83.fTrad:null);
            	

            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "campo"

    public static class visibilidad_return extends ParserRuleReturnScope {
        public boolean visibilidad;
        public String trad;
    };

    // $ANTLR start "visibilidad"
    // plp4.g:1726:1: visibilidad returns [boolean visibilidad, String trad] : ( PRIVATE | PUBLIC );
    public final plp4Parser.visibilidad_return visibilidad() throws RecognitionException {
        plp4Parser.visibilidad_return retval = new plp4Parser.visibilidad_return();
        retval.start = input.LT(1);

        Token PRIVATE84=null;
        Token PUBLIC85=null;

        retval.visibilidad = false;
        try {
            // plp4.g:1727:29: ( PRIVATE | PUBLIC )
            int alt31=2;
            int LA31_0 = input.LA(1);

            if ( (LA31_0==PRIVATE) ) {
                alt31=1;
            }
            else if ( (LA31_0==PUBLIC) ) {
                alt31=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 31, 0, input);

                throw nvae;
            }
            switch (alt31) {
                case 1 :
                    // plp4.g:1728:3: PRIVATE
                    {
                    PRIVATE84=(Token)match(input,PRIVATE,FOLLOW_PRIVATE_in_visibilidad1762); 

                    			retval.visibilidad = false;
                    			retval.trad = (PRIVATE84!=null?PRIVATE84.getText():null);
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:1734:3: PUBLIC
                    {
                    PUBLIC85=(Token)match(input,PUBLIC,FOLLOW_PUBLIC_in_visibilidad1773); 

                    			retval.visibilidad = true;
                    			retval.trad = (PUBLIC85!=null?PUBLIC85.getText():null);
                    		

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "visibilidad"

    public static class args_return extends ParserRuleReturnScope {
        public String trad;
        public HashMap<String, Integer> argumentos;
        public String tError;
    };

    // $ANTLR start "args"
    // plp4.g:1740:1: args returns [String trad, HashMap<String, Integer> argumentos, String tError] : ( DOUBLE id1= ID ( COMA DOUBLE id2= ID )* )? ;
    public final plp4Parser.args_return args() throws RecognitionException {
        plp4Parser.args_return retval = new plp4Parser.args_return();
        retval.start = input.LT(1);

        Token id1=null;
        Token id2=null;

        StringBuilder salida = new StringBuilder(); StringBuilder sError = new StringBuilder(); retval.trad = ""; retval.argumentos = new HashMap<String, Integer>(); int pos = 1;
        try {
            // plp4.g:1741:166: ( ( DOUBLE id1= ID ( COMA DOUBLE id2= ID )* )? )
            // plp4.g:1742:2: ( DOUBLE id1= ID ( COMA DOUBLE id2= ID )* )?
            {
            // plp4.g:1742:2: ( DOUBLE id1= ID ( COMA DOUBLE id2= ID )* )?
            int alt33=2;
            int LA33_0 = input.LA(1);

            if ( (LA33_0==DOUBLE) ) {
                alt33=1;
            }
            switch (alt33) {
                case 1 :
                    // plp4.g:1743:3: DOUBLE id1= ID ( COMA DOUBLE id2= ID )*
                    {
                    match(input,DOUBLE,FOLLOW_DOUBLE_in_args1796); 
                    id1=(Token)match(input,ID,FOLLOW_ID_in_args1800); 

                    			salida.append("float64");
                    			sError.append("double");
                    			retval.argumentos.put((id1!=null?id1.getText():null),pos);
                    			pos++;
                    		
                    // plp4.g:1750:3: ( COMA DOUBLE id2= ID )*
                    loop32:
                    do {
                        int alt32=2;
                        int LA32_0 = input.LA(1);

                        if ( (LA32_0==COMA) ) {
                            alt32=1;
                        }


                        switch (alt32) {
                    	case 1 :
                    	    // plp4.g:1751:4: COMA DOUBLE id2= ID
                    	    {
                    	    match(input,COMA,FOLLOW_COMA_in_args1813); 
                    	    match(input,DOUBLE,FOLLOW_DOUBLE_in_args1815); 
                    	    id2=(Token)match(input,ID,FOLLOW_ID_in_args1819); 

                    	    				salida.append(", float64");
                    	    				sError.append(",double");
                    	    				retval.argumentos.put((id2!=null?id2.getText():null),pos);
                    	    				pos++;
                    	    			

                    	    }
                    	    break;

                    	default :
                    	    break loop32;
                        }
                    } while (true);


                    }
                    break;

            }


            		retval.trad = salida.toString();
            		retval.tError = sError.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "args"


    // $ANTLR start "propiedad"
    // plp4.g:1765:1: propiedad returns [String trad] : PROPERTY tipoSimple ID LLAVEI accesores[$tipoSimple.tipo, $ID.text, $ID] LLAVED ;
    public final String propiedad() throws RecognitionException {
        String trad = null;

        Token ID87=null;
        plp4Parser.tipoSimple_return tipoSimple86 = null;

        String accesores88 = null;


        trad = "";
        try {
            // plp4.g:1766:19: ( PROPERTY tipoSimple ID LLAVEI accesores[$tipoSimple.tipo, $ID.text, $ID] LLAVED )
            // plp4.g:1767:2: PROPERTY tipoSimple ID LLAVEI accesores[$tipoSimple.tipo, $ID.text, $ID] LLAVED
            {
            match(input,PROPERTY,FOLLOW_PROPERTY_in_propiedad1851); 
            pushFollow(FOLLOW_tipoSimple_in_propiedad1854);
            tipoSimple86=tipoSimple();

            state._fsp--;

            ID87=(Token)match(input,ID,FOLLOW_ID_in_propiedad1857); 
            match(input,LLAVEI,FOLLOW_LLAVEI_in_propiedad1859); 

            		propertyActual = new SimboloProperty("propiedadActual", (tipoSimple86!=null?tipoSimple86.tipo:null));
            	
            pushFollow(FOLLOW_accesores_in_propiedad1865);
            accesores88=accesores((tipoSimple86!=null?tipoSimple86.tipo:null), (ID87!=null?ID87.getText():null), ID87);

            state._fsp--;


            		propertyActual = null;
            	
            match(input,LLAVED,FOLLOW_LLAVED_in_propiedad1872); 

            		trad = accesores88;
            	

            }

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "propiedad"


    // $ANTLR start "accesores"
    // plp4.g:1782:1: accesores[Tipo tipo, String id, Token tok] returns [String trad] : ( ( GET b1= bloque[true,false] )? ( SET b2= bloque[true,false] )? | GET PYC SET PYC );
    public final String accesores(Tipo tipo, String id, Token tok) throws RecognitionException {
        String trad = null;

        plp4Parser.bloque_return b1 = null;

        plp4Parser.bloque_return b2 = null;


        StringBuilder salida = new StringBuilder(); trad = "";
        try {
            // plp4.g:1783:63: ( ( GET b1= bloque[true,false] )? ( SET b2= bloque[true,false] )? | GET PYC SET PYC )
            int alt36=2;
            int LA36_0 = input.LA(1);

            if ( (LA36_0==GET) ) {
                int LA36_1 = input.LA(2);

                if ( (LA36_1==PYC) ) {
                    alt36=2;
                }
                else if ( (LA36_1==LLAVEI) ) {
                    alt36=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 36, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA36_0==LLAVED||LA36_0==SET) ) {
                alt36=1;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 36, 0, input);

                throw nvae;
            }
            switch (alt36) {
                case 1 :
                    // plp4.g:1784:3: ( GET b1= bloque[true,false] )? ( SET b2= bloque[true,false] )?
                    {

                    			SimboloProperty s = new SimboloProperty(id, tipo);
                    			s.setClasePadre(tablaSimbolos.getCurrentClass().getNombre());
                    		
                    // plp4.g:1788:3: ( GET b1= bloque[true,false] )?
                    int alt34=2;
                    int LA34_0 = input.LA(1);

                    if ( (LA34_0==GET) ) {
                        alt34=1;
                    }
                    switch (alt34) {
                        case 1 :
                            // plp4.g:1789:4: GET b1= bloque[true,false]
                            {

                            				s.setGet(true);
                            			
                            match(input,GET,FOLLOW_GET_in_accesores1906); 
                            pushFollow(FOLLOW_bloque_in_accesores1910);
                            b1=bloque(true, false);

                            state._fsp--;


                            				String cln = tablaSimbolos.getCurrentClass().getNombre();
                            				salida.append(".method public ").append(tipo.toWrite()).append(" 'get_").append(id).append("'()\n{\n");
                            				salida.append("\t.maxstack 1000\n");
                            				salida.append((b1!=null?b1.trad:null));
                            				salida.append("\n\tldc.r8 0\n\tret\n}\n");
                            			

                            }
                            break;

                    }

                    // plp4.g:1801:3: ( SET b2= bloque[true,false] )?
                    int alt35=2;
                    int LA35_0 = input.LA(1);

                    if ( (LA35_0==SET) ) {
                        alt35=1;
                    }
                    switch (alt35) {
                        case 1 :
                            // plp4.g:1802:4: SET b2= bloque[true,false]
                            {

                            				s.setSet(true);
                            			
                            match(input,SET,FOLLOW_SET_in_accesores1935); 
                            pushFollow(FOLLOW_bloque_in_accesores1939);
                            b2=bloque(true, false);

                            state._fsp--;


                            				salida.append(".method public void 'set_").append(id).append("'(");
                            				salida.append(tipo.toWrite()).append(")\n{\n");
                            				salida.append("\t.maxstack 1000\n");
                            				salida.append((b2!=null?b2.trad:null));
                            				salida.append("\n\tret\n}\n");
                            			

                            }
                            break;

                    }


                    			if ( !s.hasGet() && !s.hasSet() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 20 (").append(tok.getLine()).append(",").append(tok.getCharPositionInLine()+1).append("): La propiedad '");
                    				sb.append(id).append("' debe definir al menos un accesor");
                    				LanzarError( sb.toString() );
                    			}
                    			tablaSimbolos.addSimbolo(s);
                    			salida.append(".property ").append(tipo.toWrite()).append(" ");
                    			salida.append(id).append("(").append(tipo.toWrite()).append(")\n{\n");
                    			if ( s.hasGet() )
                    				salida.append("\t.get instance ").append(tipo.toWrite()).append(" '").append(tablaSimbolos.getCurrentClass().getNombre()).append("'::'get_").append(id).append("'()\n");
                    			if ( s.hasSet() )
                    				salida.append("\t.set instance void '").append(tablaSimbolos.getCurrentClass().getNombre()).append("'::'set_").append(id).append("'(").append(tipo.toWrite()).append(")\n");
                    			salida.append("}\n");
                    			trad = salida.toString();
                    		

                    }
                    break;
                case 2 :
                    // plp4.g:1833:3: GET PYC SET PYC
                    {
                    match(input,GET,FOLLOW_GET_in_accesores1961); 
                    match(input,PYC,FOLLOW_PYC_in_accesores1963); 
                    match(input,SET,FOLLOW_SET_in_accesores1965); 
                    match(input,PYC,FOLLOW_PYC_in_accesores1967); 

                    			String cln = tablaSimbolos.getCurrentClass().getNombre();
                    			salida.append(".field private ").append(tipo.toWrite()).append(" '_value_").append(id).append("'\n");
                    			salida.append(".method public ").append(tipo.toWrite()).append(" 'get_").append(id).append("'()\n{\n");
                    			salida.append("\t.maxstack 2\n\tldarg 0\n");
                    			salida.append("\tldfld ").append(tipo.toWrite()).append(" '").append(cln).append("'::'_value_").append(id);
                    			salida.append("'\n\tret\n}\n");

                    			salida.append(".method public void 'set_").append(id).append("'(");
                    			salida.append(tipo.toWrite()).append(")\n{\n");
                    			salida.append("\t.maxstack 2\n\tldarg 0\n\tldarg 1\n");
                    			salida.append("\tstfld ").append(tipo.toWrite()).append(" '").append(cln).append("'::'_value_").append(id);
                    			salida.append("'\n\tret\n}\n");

                    			salida.append(".property ").append(tipo.toWrite()).append(" ");
                    			salida.append(id).append("(").append(tipo.toWrite()).append(")\n{\n");
                    			salida.append("\t.get instance ").append(tipo.toWrite()).append(" '").append(cln).append("'::get_").append(id).append("()\n");
                    			salida.append("\t.set instance void '").append(cln).append("'::'set_").append(id).append("'(").append(tipo.toWrite()).append(")\n}\n");
                    			trad = salida.toString();

                    			SimboloProperty s = new SimboloProperty(id, tipo);
                    			s.setGet(true);
                    			s.setSet(true);
                    			tablaSimbolos.addSimbolo(s);
                    		

                    }
                    break;

            }
        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return trad;
    }
    // $ANTLR end "accesores"

    public static class params_return extends ParserRuleReturnScope {
        public String trad;
        public int size;
        public String tError;
        public String tParams;
    };

    // $ANTLR start "params"
    // plp4.g:1860:1: params[Token tok] returns [String trad, int size, String tError, String tParams] : (e1= expr[null] ( COMA e2= expr[null] )* )? ;
    public final plp4Parser.params_return params(Token tok) throws RecognitionException {
        plp4Parser.params_return retval = new plp4Parser.params_return();
        retval.start = input.LT(1);

        Token COMA89=null;
        plp4Parser.expr_return e1 = null;

        plp4Parser.expr_return e2 = null;


        StringBuilder salida = new StringBuilder(); StringBuilder stParams = new StringBuilder(); StringBuilder sError = new StringBuilder(); retval.trad = ""; retval.size = 0; retval.tError = ""; retval.tParams = "";
        try {
            // plp4.g:1861:193: ( (e1= expr[null] ( COMA e2= expr[null] )* )? )
            // plp4.g:1862:2: (e1= expr[null] ( COMA e2= expr[null] )* )?
            {
            // plp4.g:1862:2: (e1= expr[null] ( COMA e2= expr[null] )* )?
            int alt38=2;
            int LA38_0 = input.LA(1);

            if ( (LA38_0==ID||LA38_0==PARI||(LA38_0>=ENTERO && LA38_0<=BOOLEANO)||LA38_0==NOT) ) {
                alt38=1;
            }
            switch (alt38) {
                case 1 :
                    // plp4.g:1863:3: e1= expr[null] ( COMA e2= expr[null] )*
                    {
                    pushFollow(FOLLOW_expr_in_params1993);
                    e1=expr(null);

                    state._fsp--;


                    			retval.size++;
                    			salida.append((e1!=null?e1.trad:null));
                    			if ( !(e1!=null?e1.trad:null).equals("") )
                    				salida.append("\tconv.r8\n");
                    			sError.append("double");
                    			stParams.append("float64");
                    			if ( (e1!=null?e1.sr:null).isBooleano() )
                    			{
                    				StringBuilder sb = new StringBuilder();
                    				sb.append("Error 28 (").append(tok.getLine()).append(",").append(tok.getCharPositionInLine()+1).append("): tipo incompatible en el parametro");
                    				LanzarError( sb.toString() );
                    			}
                    		
                    // plp4.g:1878:3: ( COMA e2= expr[null] )*
                    loop37:
                    do {
                        int alt37=2;
                        int LA37_0 = input.LA(1);

                        if ( (LA37_0==COMA) ) {
                            alt37=1;
                        }


                        switch (alt37) {
                    	case 1 :
                    	    // plp4.g:1879:4: COMA e2= expr[null]
                    	    {
                    	    COMA89=(Token)match(input,COMA,FOLLOW_COMA_in_params2007); 
                    	    pushFollow(FOLLOW_expr_in_params2011);
                    	    e2=expr(null);

                    	    state._fsp--;


                    	    				retval.size++;
                    	    				salida.append((e2!=null?e2.trad:null));
                    	    				if ( !(e2!=null?e2.trad:null).equals("") )
                    	    					salida.append("\tconv.r8\n");
                    	    				sError.append(",double");
                    	    				stParams.append(",float64");
                    	    				if ( (e2!=null?e2.sr:null).isBooleano() )
                    	    				{
                    	    					StringBuilder sb = new StringBuilder();
                    	    					sb.append("Error 28 (").append(COMA89.getLine()).append(",").append(COMA89.getCharPositionInLine()+1).append("): tipo incompatible en el parametro");
                    	    					LanzarError( sb.toString() );
                    	    				}
                    	    			

                    	    }
                    	    break;

                    	default :
                    	    break loop37;
                        }
                    } while (true);


                    }
                    break;

            }


            		retval.trad = salida.toString();
            		retval.tError = sError.toString();
            		retval.tParams = stParams.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "params"

    public static class subref_return extends ParserRuleReturnScope {
        public String trad;
        public Token id;
        public Simbolo simbolo;
        public String text;
        public Simbolo sInicio;
        public String cima;
        public String cln;
        public int cont;
    };

    // $ANTLR start "subref"
    // plp4.g:1903:1: subref[int padre] returns [String trad, Token id, Simbolo simbolo, String text, Simbolo sInicio, String cima, String cln, int cont] : id1= ID ( PUNTO id2= ID )* ;
    public final plp4Parser.subref_return subref(int padre) throws RecognitionException {
        plp4Parser.subref_return retval = new plp4Parser.subref_return();
        retval.start = input.LT(1);

        Token id1=null;
        Token id2=null;

        StringBuilder salida = new StringBuilder(); retval.trad = ""; Simbolo ultimo = null; retval.sInicio = null; retval.cima = ""; retval.cln = ""; retval.cont = 0;
        try {
            // plp4.g:1904:137: (id1= ID ( PUNTO id2= ID )* )
            // plp4.g:1905:2: id1= ID ( PUNTO id2= ID )*
            {
            id1=(Token)match(input,ID,FOLLOW_ID_in_subref2048); 

            		retval.cont++;
            		Simbolo s = tablaSimbolos.getSimbolo((id1!=null?id1.getText():null));
            		retval.sInicio = tablaSimbolos.getSimbolo((id1!=null?id1.getText():null));
            		if ( (id1!=null?id1.getText():null).equals("value") && propertyActual != null )
            		{
            			s = new SimboloProperty("valueAux", propertyActual.getTipo() );
            		}
            		else if ( s != null && isMain && ( s.isCampo() || s.isProperty() || s.isFuncion() ) )
            		{
            			StringBuilder sb = new StringBuilder();
            			sb.append("Error 31 (").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): miembro '");
            			sb.append((id1!=null?id1.getText():null)).append("' no accesible desde Main");
            			LanzarError( sb.toString() );
            		}
            		else if ( s == null )
            		{
            			if ( padre == -1 || !tablaSimbolos.findMetodo((id1!=null?id1.getText():null)))
            			{
            				if ( tablaSimbolos.findMetodo((id1!=null?id1.getText():null)) )
            				{
            					StringBuilder sb = new StringBuilder();
            					sb.append("Error 23 (").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): identificador '");
            					sb.append((id1!=null?id1.getText():null)).append("' usado incorrectamente");
            					LanzarError( sb.toString() );
            				}
            				if ( funcionActual == null || !funcionActual.hasArg((id1!=null?id1.getText():null)))
            				{
            					StringBuilder sb = new StringBuilder();
            					sb.append("Error 2 (").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): simbolo '");
            					sb.append((id1!=null?id1.getText():null)).append("' no ha sido declarado");
            					LanzarError( sb.toString() );
            				}
            				else
            				{
            					s = new SimboloFuncion("sAux", new TipoReal());
            					retval.sInicio = s;
            					salida.append("arg ").append(funcionActual.getArgs().get((id1!=null?id1.getText():null))).append("\n");
            				}
            			}
            			else
            			{
            				s = new Simbolo("metodoAux", null);
            				retval.sInicio = s;
            			}
            		}
            		else
            		{
            			if ( s.isCampo() )
            			{
            				if ( s.isConstante() )
            					salida.append("s");
            				salida.append("fld ").append(s.toWrite()).append(" '").append(((SimboloCampo)s).getClasePadre()).append("'::'");
            				salida.append(s.getNombre()).append("'\n");
            			}
            			else if ( !s.isProperty() )
            			{
            				salida.append("loc ").append(s.getLocalPos()).append("\n");
            			}
            			else
            			{
            				salida.append("arg 0\n");
            			}
            		};
            		ultimo = s;
            		retval.simbolo = s;
            		retval.id = id1;
            		retval.text = (id1!=null?id1.getText():null);
            	
            // plp4.g:1975:2: ( PUNTO id2= ID )*
            loop39:
            do {
                int alt39=2;
                int LA39_0 = input.LA(1);

                if ( (LA39_0==PUNTO) ) {
                    int LA39_2 = input.LA(2);

                    if ( (LA39_2==ID) ) {
                        alt39=1;
                    }


                }


                switch (alt39) {
            	case 1 :
            	    // plp4.g:1976:3: PUNTO id2= ID
            	    {
            	    match(input,PUNTO,FOLLOW_PUNTO_in_subref2058); 
            	    id2=(Token)match(input,ID,FOLLOW_ID_in_subref2062); 

            	    			retval.cont++;
            	    			salida = new StringBuilder();
            	    			if ( ultimo == null || !( ultimo.isObjeto() || ( ultimo.isCampo() && ultimo.getTipo().isClass() ) ) )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 23 (").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): identificador '");
            	    				sb.append((id1!=null?id1.getText():null)).append("' usado incorrectamente");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			if ( isMain && ultimo.isCampo() || ultimo.isProperty() || ultimo.isFuncion() )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 31(").append(id1.getLine()).append(",").append(id1.getCharPositionInLine()+1).append("): miembro '");
            	    				sb.append((id1!=null?id1.getText():null)).append("' no accesible desde Main");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			TablaSimbolos ts = null;
            	    			boolean mismaClase = true;
            	    			if ( ultimo.getTipo() == null || ultimo.getTipo().getNombre().equals(tablaSimbolos.getCurrentClass().getNombre()) )
            	    			{
            	    				ts = tablaSimbolos;
            	    			}
            	    			else
            	    			{
            	    				mismaClase = false;
            	    				ts = ((TipoClase)ultimo.getTipo()).getTablaSimbolos();
            	    			}
            	    			retval.cln = ts.getCurrentClass().getNombre();
            	    			s = ts.getSimbolo((id2!=null?id2.getText():null));
            	    			if ( s != null && !mismaClase && !s.isVisible() )
            	    			{
            	    				StringBuilder sb = new StringBuilder();
            	    				sb.append("Error 2 (").append(id2.getLine()).append(",").append(id2.getCharPositionInLine()+1).append("): simbolo '");
            	    				sb.append((id2!=null?id2.getText():null)).append("' no ha sido declarado");
            	    				LanzarError( sb.toString() );
            	    			}
            	    			if ( s == null )
            	    			{
            	    				if ( padre == -1 || !ts.findMetodo((id2!=null?id2.getText():null)))
            	    				{
            	    					StringBuilder sb = new StringBuilder();
            	    					sb.append("Error 2 (").append(id2.getLine()).append(",").append(id2.getCharPositionInLine()+1).append("): simbolo '");
            	    					sb.append((id2!=null?id2.getText():null)).append("' no ha sido declarado");
            	    					LanzarError( sb.toString() );
            	    				}
            	    			}
            	    			if ( padre == -1 )
            	    			{
            	    				if ( !s.isProperty() )
            	    					salida.append("\tldfld ").append(s.getTipo().toWrite()).append(" '").append(retval.cln).append("'::'").append((id2!=null?id2.getText():null)).append("'\n");
            	    				else
            	    				{
            	    					retval.cima = s.getTipo().toWrite();
            	    					salida = new StringBuilder();
            	    //					salida.append("\tldloc ").append(ultimo.getLocalPos()).append("\n");
            	    //					salida.append("\tcall instance ").append(s.toWrite()).append(" '").append(cln).append("'::'").append((id2!=null?id2.getText():null)).append("'()\n");
            	    				}
            	    			}
            	    			ultimo = s;
            	    			retval.simbolo = ultimo;
            	    			retval.id = id2;
            	    			retval.text = (id2!=null?id2.getText():null);
            	    		

            	    }
            	    break;

            	default :
            	    break loop39;
                }
            } while (true);


            		retval.trad = salida.toString();
            	

            }

            retval.stop = input.LT(-1);

        }
         
        	catch (RecognitionException re)
        	{ 
        		reportError(re); 
        		System.exit(1); 
        	} 
        finally {
        }
        return retval;
    }
    // $ANTLR end "subref"

    // Delegated rules


    protected DFA17 dfa17 = new DFA17(this);
    protected DFA27 dfa27 = new DFA27(this);
    protected DFA30 dfa30 = new DFA30(this);
    static final String DFA17_eotS =
        "\25\uffff";
    static final String DFA17_eofS =
        "\25\uffff";
    static final String DFA17_minS =
        "\1\5\6\uffff\1\14\5\uffff\2\5\2\uffff\1\5\1\14\2\uffff";
    static final String DFA17_maxS =
        "\1\51\6\uffff\1\53\5\uffff\1\61\1\54\2\uffff\1\20\1\53\2\uffff";
    static final String DFA17_acceptS =
        "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\uffff\1\11\1\12\1\13\1\14\1\15"+
        "\2\uffff\1\7\1\17\2\uffff\1\16\1\10";
    static final String DFA17_specialS =
        "\25\uffff}>";
    static final String[] DFA17_transitionS = {
            "\1\7\1\1\23\uffff\1\2\1\uffff\1\3\1\4\3\uffff\1\5\1\6\1\uffff"+
            "\1\10\1\11\1\12\1\uffff\1\13\1\14",
            "",
            "",
            "",
            "",
            "",
            "",
            "\1\20\7\uffff\1\15\3\uffff\1\17\22\uffff\1\16",
            "",
            "",
            "",
            "",
            "",
            "\1\17\6\uffff\1\17\10\uffff\3\17\13\uffff\1\21\15\uffff\1\17",
            "\1\22\46\uffff\1\17",
            "",
            "",
            "\1\23\10\uffff\3\24",
            "\1\20\7\uffff\1\17\3\uffff\1\17\22\uffff\1\16",
            "",
            ""
    };

    static final short[] DFA17_eot = DFA.unpackEncodedString(DFA17_eotS);
    static final short[] DFA17_eof = DFA.unpackEncodedString(DFA17_eofS);
    static final char[] DFA17_min = DFA.unpackEncodedStringToUnsignedChars(DFA17_minS);
    static final char[] DFA17_max = DFA.unpackEncodedStringToUnsignedChars(DFA17_maxS);
    static final short[] DFA17_accept = DFA.unpackEncodedString(DFA17_acceptS);
    static final short[] DFA17_special = DFA.unpackEncodedString(DFA17_specialS);
    static final short[][] DFA17_transition;

    static {
        int numStates = DFA17_transitionS.length;
        DFA17_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA17_transition[i] = DFA.unpackEncodedString(DFA17_transitionS[i]);
        }
    }

    class DFA17 extends DFA {

        public DFA17(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 17;
            this.eot = DFA17_eot;
            this.eof = DFA17_eof;
            this.min = DFA17_min;
            this.max = DFA17_max;
            this.accept = DFA17_accept;
            this.special = DFA17_special;
            this.transition = DFA17_transition;
        }
        public String getDescription() {
            return "518:1: instr[boolean pop] returns [ String trad ] : ( bloque[pop, false] | IF PARI e3= expr[null] PARD i1= instr[true] ( ELSE i2= instr[true] )? | WHILE PARI e4= expr[null] PARD i3= instr[true] | FOR PARI INT ID ASIG e1= expr[s] TO e2= expr[null] STEP ( ADDOP )? ENTERO PARD i4= instr[false] | BREAK PYC | CONTINUE PYC | ref[\"cambio\"] cambio[$ref.s, $ref.trad, $ref.sInicio, $ref.cont] | ID ASIG NEW tipoSimple CORI dims[tArray] CORD PYC | WRITELINE PARI ex1= expr[null] PARD PYC | TRY b2= bloque[true, false] bloquecatch[pilaEtiquetas.peek()] | THROW ( NEW EXCEPTION PARI ex2= expr[null] PARD )? PYC | EXPLAIN ID PYC | RETURN exa= expr[null] PYC | id1= ID ASIG NEW id2= ID PARI params[$PARI] PARD PYC | subref[0] PARI params[$PARI] PARD PYC );";
        }
    }
    static final String DFA27_eotS =
        "\10\uffff";
    static final String DFA27_eofS =
        "\10\uffff";
    static final String DFA27_minS =
        "\1\5\2\uffff\1\14\1\5\2\uffff\1\14";
    static final String DFA27_maxS =
        "\1\27\2\uffff\1\60\1\5\2\uffff\1\60";
    static final String DFA27_acceptS =
        "\1\uffff\1\1\1\2\2\uffff\1\4\1\3\1\uffff";
    static final String DFA27_specialS =
        "\10\uffff}>";
    static final String[] DFA27_transitionS = {
            "\1\3\6\uffff\1\2\10\uffff\3\1",
            "",
            "",
            "\1\5\1\6\4\uffff\2\6\4\uffff\2\6\4\uffff\3\6\12\uffff\1\4\1"+
            "\uffff\4\6",
            "\1\7",
            "",
            "",
            "\1\5\1\6\4\uffff\2\6\4\uffff\2\6\4\uffff\3\6\12\uffff\1\4\1"+
            "\uffff\4\6"
    };

    static final short[] DFA27_eot = DFA.unpackEncodedString(DFA27_eotS);
    static final short[] DFA27_eof = DFA.unpackEncodedString(DFA27_eofS);
    static final char[] DFA27_min = DFA.unpackEncodedStringToUnsignedChars(DFA27_minS);
    static final char[] DFA27_max = DFA.unpackEncodedStringToUnsignedChars(DFA27_maxS);
    static final short[] DFA27_accept = DFA.unpackEncodedString(DFA27_acceptS);
    static final short[] DFA27_special = DFA.unpackEncodedString(DFA27_specialS);
    static final short[][] DFA27_transition;

    static {
        int numStates = DFA27_transitionS.length;
        DFA27_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA27_transition[i] = DFA.unpackEncodedString(DFA27_transitionS[i]);
        }
    }

    class DFA27 extends DFA {

        public DFA27(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 27;
            this.eot = DFA27_eot;
            this.eof = DFA27_eof;
            this.min = DFA27_min;
            this.max = DFA27_max;
            this.accept = DFA27_accept;
            this.special = DFA27_special;
            this.transition = DFA27_transition;
        }
        public String getDescription() {
            return "1384:1: base[Simbolo sh, String op] returns [ String cima, String trad, Simbolo sr ] : ( ( ENTERO | REAL | BOOLEANO ) | PARI expr[sh] PARD | ref[op] | subref[1] PARI params[$PARI] PARD );";
        }
    }
    static final String DFA30_eotS =
        "\13\uffff";
    static final String DFA30_eofS =
        "\13\uffff";
    static final String DFA30_minS =
        "\1\10\2\5\2\uffff\4\5\1\uffff\1\14";
    static final String DFA30_maxS =
        "\1\63\2\21\2\uffff\1\14\3\5\1\uffff\1\30";
    static final String DFA30_acceptS =
        "\3\uffff\1\3\1\1\4\uffff\1\2\1\uffff";
    static final String DFA30_specialS =
        "\13\uffff}>";
    static final String[] DFA30_transitionS = {
            "\1\2\51\uffff\1\1\1\3",
            "\1\5\10\uffff\1\6\1\7\1\10\1\4",
            "\1\5\3\uffff\1\11\4\uffff\1\6\1\7\1\10\1\4",
            "",
            "",
            "\1\4\6\uffff\1\11",
            "\1\12",
            "\1\12",
            "\1\12",
            "",
            "\1\11\5\uffff\2\4\4\uffff\1\4"
    };

    static final short[] DFA30_eot = DFA.unpackEncodedString(DFA30_eotS);
    static final short[] DFA30_eof = DFA.unpackEncodedString(DFA30_eofS);
    static final char[] DFA30_min = DFA.unpackEncodedStringToUnsignedChars(DFA30_minS);
    static final char[] DFA30_max = DFA.unpackEncodedStringToUnsignedChars(DFA30_maxS);
    static final short[] DFA30_accept = DFA.unpackEncodedString(DFA30_acceptS);
    static final short[] DFA30_special = DFA.unpackEncodedString(DFA30_specialS);
    static final short[][] DFA30_transition;

    static {
        int numStates = DFA30_transitionS.length;
        DFA30_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA30_transition[i] = DFA.unpackEncodedString(DFA30_transitionS[i]);
        }
    }

    class DFA30 extends DFA {

        public DFA30(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 30;
            this.eot = DFA30_eot;
            this.eof = DFA30_eof;
            this.min = DFA30_min;
            this.max = DFA30_max;
            this.accept = DFA30_accept;
            this.special = DFA30_special;
            this.transition = DFA30_transition;
        }
        public String getDescription() {
            return "1697:1: miembro returns [String trad] : ( campo | metodo | propiedad );";
        }
    }
 

    public static final BitSet FOLLOW_clase_in_s52 = new BitSet(new long[]{0x0000000000000012L});
    public static final BitSet FOLLOW_CLASS_in_clase84 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_clase86 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_LLAVEI_in_clase92 = new BitSet(new long[]{0x000C000000000100L});
    public static final BitSet FOLLOW_miembro_in_clase99 = new BitSet(new long[]{0x000C000000000180L});
    public static final BitSet FOLLOW_LLAVED_in_clase107 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PUBLIC_in_metodo131 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_STATIC_in_metodo133 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_VOID_in_metodo135 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_MAIN_in_metodo137 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_metodo139 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_metodo141 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_bloque_in_metodo149 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_visibilidad_in_metodo161 = new BitSet(new long[]{0x000000000001C020L});
    public static final BitSet FOLLOW_tipoSimple_in_metodo164 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_metodo168 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_metodo170 = new BitSet(new long[]{0x000000000000A000L});
    public static final BitSet FOLLOW_args_in_metodo172 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_metodo174 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_bloque_in_metodo184 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_INT_in_tipoSimple208 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOUBLE_in_tipoSimple221 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_BOOL_in_tipoSimple232 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_tipo250 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_tipoSimple_in_tipo261 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_constdecl_in_decl285 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_vardecl_in_decl297 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CONST_in_constdecl322 = new BitSet(new long[]{0x000000000001C000L});
    public static final BitSet FOLLOW_tipoSimple_in_constdecl324 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_constid_in_constdecl328 = new BitSet(new long[]{0x00000000000C0000L});
    public static final BitSet FOLLOW_COMA_in_constdecl339 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_constid_in_constdecl343 = new BitSet(new long[]{0x00000000000C0000L});
    public static final BitSet FOLLOW_PYC_in_constdecl355 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_constid377 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ASIG_in_constid379 = new BitSet(new long[]{0x0000000000E00000L});
    public static final BitSet FOLLOW_ENTERO_in_constid387 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_REAL_in_constid402 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_BOOLEANO_in_constid416 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_tipo_in_vardecl443 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_varid_in_vardecl447 = new BitSet(new long[]{0x00000000000C0000L});
    public static final BitSet FOLLOW_COMA_in_vardecl458 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_varid_in_vardecl462 = new BitSet(new long[]{0x00000000000C0000L});
    public static final BitSet FOLLOW_PYC_in_vardecl474 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_varid496 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_CORI_in_varid506 = new BitSet(new long[]{0x0000000002040000L});
    public static final BitSet FOLLOW_COMA_in_varid524 = new BitSet(new long[]{0x0000000002040000L});
    public static final BitSet FOLLOW_CORD_in_varid533 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_instr_in_declins562 = new BitSet(new long[]{0x000003763403C062L});
    public static final BitSet FOLLOW_decl_in_declins575 = new BitSet(new long[]{0x000003763403C062L});
    public static final BitSet FOLLOW_LLAVEI_in_bloque606 = new BitSet(new long[]{0x000003763403C060L});
    public static final BitSet FOLLOW_declins_in_bloque612 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LLAVED_in_bloque618 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bloque_in_instr641 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_IF_in_instr654 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_instr656 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_instr660 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_instr669 = new BitSet(new long[]{0x0000037634E01060L});
    public static final BitSet FOLLOW_instr_in_instr673 = new BitSet(new long[]{0x0000000008000002L});
    public static final BitSet FOLLOW_ELSE_in_instr687 = new BitSet(new long[]{0x0000037634E01060L});
    public static final BitSet FOLLOW_instr_in_instr691 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_WHILE_in_instr713 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_instr715 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_instr719 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_instr728 = new BitSet(new long[]{0x0000037634E01060L});
    public static final BitSet FOLLOW_instr_in_instr732 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FOR_in_instr744 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_instr746 = new BitSet(new long[]{0x0000000000004000L});
    public static final BitSet FOLLOW_INT_in_instr748 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_instr750 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ASIG_in_instr759 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_instr763 = new BitSet(new long[]{0x0000000040000000L});
    public static final BitSet FOLLOW_TO_in_instr766 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_instr770 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_STEP_in_instr773 = new BitSet(new long[]{0x0000000100200000L});
    public static final BitSet FOLLOW_ADDOP_in_instr776 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_ENTERO_in_instr780 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_instr782 = new BitSet(new long[]{0x0000037634E01060L});
    public static final BitSet FOLLOW_instr_in_instr792 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_BREAK_in_instr804 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr806 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CONTINUE_in_instr817 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr819 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ref_in_instr830 = new BitSet(new long[]{0x0000080000100000L});
    public static final BitSet FOLLOW_cambio_in_instr833 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_instr845 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ASIG_in_instr853 = new BitSet(new long[]{0x0000000800000000L});
    public static final BitSet FOLLOW_NEW_in_instr855 = new BitSet(new long[]{0x000003763503C060L});
    public static final BitSet FOLLOW_tipoSimple_in_instr857 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_CORI_in_instr865 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_dims_in_instr867 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_CORD_in_instr870 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr878 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_WRITELINE_in_instr885 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_instr887 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_instr891 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_instr900 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr902 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TRY_in_instr909 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_bloque_in_instr919 = new BitSet(new long[]{0x0000040000000000L});
    public static final BitSet FOLLOW_bloquecatch_in_instr922 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_THROW_in_instr934 = new BitSet(new long[]{0x0000000800080000L});
    public static final BitSet FOLLOW_NEW_in_instr938 = new BitSet(new long[]{0x0000008000000000L});
    public static final BitSet FOLLOW_EXCEPTION_in_instr940 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_instr942 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_instr946 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_instr949 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr954 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_EXPLAIN_in_instr966 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_instr968 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr970 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RETURN_in_instr981 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_instr991 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr996 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_instr1009 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ASIG_in_instr1011 = new BitSet(new long[]{0x0000000800000000L});
    public static final BitSet FOLLOW_NEW_in_instr1013 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_instr1017 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_instr1019 = new BitSet(new long[]{0x0002037634E03060L});
    public static final BitSet FOLLOW_params_in_instr1021 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_instr1024 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr1026 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_subref_in_instr1037 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_instr1040 = new BitSet(new long[]{0x0002037634E03060L});
    public static final BitSet FOLLOW_params_in_instr1042 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_instr1045 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_instr1047 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CATCH_in_bloquecatch1069 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_bloquecatch1071 = new BitSet(new long[]{0x0000008000000000L});
    public static final BitSet FOLLOW_EXCEPTION_in_bloquecatch1073 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_bloquecatch1075 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_bloquecatch1077 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_bloque_in_bloquecatch1083 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ENTERO_in_dims1108 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_COMA_in_dims1118 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_ENTERO_in_dims1122 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_ASIG_in_cambio1150 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_cambio1152 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_cambio1155 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PUNTO_in_cambio1166 = new BitSet(new long[]{0x0000100000000000L});
    public static final BitSet FOLLOW_READLINE_in_cambio1168 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_cambio1170 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_eand_in_expr1195 = new BitSet(new long[]{0x0000200000000002L});
    public static final BitSet FOLLOW_OR_in_expr1206 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_eand_in_expr1210 = new BitSet(new long[]{0x0000200000000002L});
    public static final BitSet FOLLOW_erel_in_eand1243 = new BitSet(new long[]{0x0000400000000002L});
    public static final BitSet FOLLOW_AND_in_eand1254 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_erel_in_eand1258 = new BitSet(new long[]{0x0000400000000002L});
    public static final BitSet FOLLOW_esum_in_erel1291 = new BitSet(new long[]{0x0000800000000002L});
    public static final BitSet FOLLOW_RELOP_in_erel1302 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_esum_in_erel1306 = new BitSet(new long[]{0x0000800000000002L});
    public static final BitSet FOLLOW_term_in_esum1339 = new BitSet(new long[]{0x0000000100000002L});
    public static final BitSet FOLLOW_ADDOP_in_esum1350 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_term_in_esum1354 = new BitSet(new long[]{0x0000000100000002L});
    public static final BitSet FOLLOW_factor_in_term1387 = new BitSet(new long[]{0x0001000000000002L});
    public static final BitSet FOLLOW_MULOP_in_term1398 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_factor_in_term1402 = new BitSet(new long[]{0x0001000000000002L});
    public static final BitSet FOLLOW_base_in_factor1433 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NOT_in_factor1444 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_factor_in_factor1448 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PARI_in_factor1459 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_ADDOP_in_factor1461 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_factor_in_factor1465 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_factor1468 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ENTERO_in_base1498 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_REAL_in_base1512 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_BOOLEANO_in_base1526 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PARI_in_base1541 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_base1543 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_base1546 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ref_in_base1558 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_subref_in_base1570 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_PARI_in_base1573 = new BitSet(new long[]{0x0002037634E03060L});
    public static final BitSet FOLLOW_params_in_base1575 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_PARD_in_base1578 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_subref_in_ref1601 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_CORI_in_ref1612 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_indices_in_ref1620 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_CORD_in_ref1623 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_indices1652 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_COMA_in_indices1663 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_indices1667 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_campo_in_miembro1695 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_metodo_in_miembro1706 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_propiedad_in_miembro1717 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_visibilidad_in_campo1736 = new BitSet(new long[]{0x000003763403C060L});
    public static final BitSet FOLLOW_decl_in_campo1742 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PRIVATE_in_visibilidad1762 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PUBLIC_in_visibilidad1773 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_DOUBLE_in_args1796 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_args1800 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_COMA_in_args1813 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_DOUBLE_in_args1815 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_args1819 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_PROPERTY_in_propiedad1851 = new BitSet(new long[]{0x000003763403C060L});
    public static final BitSet FOLLOW_tipoSimple_in_propiedad1854 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_propiedad1857 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_LLAVEI_in_propiedad1859 = new BitSet(new long[]{0x0030000000000080L});
    public static final BitSet FOLLOW_accesores_in_propiedad1865 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_LLAVED_in_propiedad1872 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_GET_in_accesores1906 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_bloque_in_accesores1910 = new BitSet(new long[]{0x0020000000000002L});
    public static final BitSet FOLLOW_SET_in_accesores1935 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_bloque_in_accesores1939 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_GET_in_accesores1961 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_accesores1963 = new BitSet(new long[]{0x0020000000000000L});
    public static final BitSet FOLLOW_SET_in_accesores1965 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_PYC_in_accesores1967 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_params1993 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_COMA_in_params2007 = new BitSet(new long[]{0x0002037634E01060L});
    public static final BitSet FOLLOW_expr_in_params2011 = new BitSet(new long[]{0x0000000000040002L});
    public static final BitSet FOLLOW_ID_in_subref2048 = new BitSet(new long[]{0x0000080000000002L});
    public static final BitSet FOLLOW_PUNTO_in_subref2058 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_ID_in_subref2062 = new BitSet(new long[]{0x0000080000000002L});

}